home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / odoors41.zip / OPENDOOR.DOC < prev    next >
Text File  |  1993-04-05  |  535KB  |  12,634 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                           -----------------------------
  18.                                     OpenDoors
  19.                              Door Programming Toolkit
  20.                                   Version 4.10
  21.                                Programmer's Manual
  22.                           -----------------------------
  23.  
  24.  
  25.          (C) Copyright 1991 - 1993 by Brian Pirie. All Rights Reserved.
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.        NOTE: Since this manual is likely something that you will want to
  44.              refer to at the same time that you are working with
  45.              OpenDoors, looking at the sample source code, or writing
  46.              your own door and utility programs, it is highly recommended
  47.              that you take a moment to print it out. Simply type COPY
  48.              OPENDOOR.DOC PRN from your DOS prompt.
  49.  
  50.  
  51.  
  52.  
  53.                               TABLE OF CONTENTS
  54.  
  55.           TABLE OF CONTENTS .......................................2
  56.  
  57.           CHAPTER 1 - INTRODUCTION TO OPENDOORS ...................4
  58.                WELCOME! ...........................................4
  59.                FEATURES OF THE OPENDOORS DOOR TOOLKIT .............4
  60.  
  61.           CHAPTER 2 - ABOUT THE DEMO VERSION AND ORDERING .........7
  62.                THE DEMO VERSION & BENEFITS OF REGISTERING .........7
  63.                FILLING OUT THE REGISTRATION FORM ..................11
  64.                SENDING YOUR ORDER FEE .............................13
  65.                ORDERING THE SOURCE CODE ...........................15
  66.                ORDER FORM .........................................17
  67.                USER FEEDBACK FORM .................................19
  68.  
  69.           CHAPTER 3 - LEARNING THE BASICS OF OPENDOORS ............20
  70.                ABOUT THIS MANUAL ..................................20
  71.                COMPILING A PROGRAM WITH OPENDOORS .................21
  72.                BASICS OF DOOR PROGRAMMING WITH OPENDOORS ..........23
  73.                A SAMPLE DOOR PROGRAM: "EZVOTE" ....................26
  74.  
  75.           CHAPTER 4 - THE OPENDOORS DOORDRIVER FUNCTIONS ..........31
  76.                AN OVERVIEW OF THE FUNCTIONS .......................31
  77.                OD_CARRIER() .......................................35
  78.                OD_COLOUR_CONFIG() .................................37
  79.                OD_CLEAR_KEYBUFFER() ...............................39
  80.                OD_CLR_LINE() ......................................41
  81.                OD_CLR_SCR() .......................................43
  82.                OD_DISP() ..........................................45
  83.                OD_DISP_STR() ......................................47
  84.                OD_DRAW_BOX() ......................................49
  85.                OD_EDIT_STR() ......................................52
  86.                OD_EMULATE() .......................................63
  87.                OD_EXIT() ..........................................65
  88.                OD_GET_ANSWER() ....................................67
  89.                OD_GET_KEY() .......................................68
  90.                OD_HOTKEY_MENU() ...................................72
  91.                OD_INIT() ..........................................74
  92.                OD_INIT_WITH_CONFIG() ..............................77
  93.                OD_INPUT_STR() .....................................84
  94.                OD_KERNAL() ........................................86
  95.                OD_LIST_FILES() ....................................88
  96.                OD_LOG_OPEN() ......................................90
  97.                OD_LOG_WRITE() .....................................92
  98.                OD_PAGE() ..........................................93
  99.                OD_PRINTF() ........................................94
  100.                OD_PUTCH() .........................................98
  101.                OD_REPEAT() ........................................100
  102.                OD_SEND_FILE() .....................................102
  103.                OD_SET_ATTRIB() ....................................106
  104.                OD_SET_COLOUR() ....................................109
  105.                OD_SET_CURSOR() ....................................112
  106.                OD_SET_STATUSLINE() ................................114
  107.                OD_SPAWN() .........................................116
  108.                OD_SPAWNVPE() ......................................118
  109.  
  110. OpenDoors Door Toolkit Manual - Version 4.10                       Page 2
  111.  
  112.  
  113.  
  114.  
  115.  
  116.           CHAPTER 5 - THE OPENDOORS CONTROL STRUCTURE .............120
  117.                INTRODUCTION TO THE CONTROL STRUCTURE ..............120
  118.                CONTROL STRUCTURE - DOOR INFO FILE STATS ...........122
  119.                CONTROL STRUCTURE - MODEM SETTINGS .................125
  120.                CONTROL STRUCTURE - BBS AND CALLER INFORMATION .....126
  121.                CONTROL STRUCTURE - DOOR SETTINGS ..................147
  122.                CONTROL STRUCTURE - OPENDOORS CUSTOMIZATION ........150
  123.                CONTROL STRUCTURE - FUNCTION KEYS ..................161
  124.                CONTROL STRUCTURE - COLOUR CUSTOMIZATION ...........164
  125.                CONTROL STRUCTURE - TEXT CUSTOMIZATION .............165
  126.  
  127.           CHAPTER 6 - DEBUGGING OPENDOORS DOORS & GETTING HELP ....169
  128.                ABOUT THIS CHAPTER .................................169
  129.                TROUBLESHOOTING PROBLEMS ...........................169
  130.                SOLUTIONS TO COMMON PROBLEMS .......................171
  131.                OPENDOORS SUPPORT ..................................173
  132.                THE OPENDOORS SUPPORT BBS ..........................173
  133.                THE OPENDOORS ECHOMAIL CONFERENCE ..................174
  134.                GETTING IN TOUCH WITH ME ...........................174
  135.                OPENDOORS DISTRIBUTION SITES .......................176
  136.                JOINING THE DISTRIBUTION NETWORK ...................179
  137.  
  138.           APPENDIX A - CONTENTS OF ARCHIVE ........................181
  139.  
  140.           APPENDIX B - OPENDOORS HISTORY ..........................182
  141.  
  142.           APPENDIX C - FUTURE VERSIONS ............................191
  143.  
  144.           APPENDIX D - SPECIAL THANKS .............................192
  145.  
  146.           GLOSSARY ................................................193
  147.  
  148.           INDEX ...................................................201
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172. OpenDoors Door Toolkit Manual - Version 4.10                       Page 3
  173.  
  174.  
  175.  
  176. --------------------------------------------------------------------------------
  177. CHAPTER 1 - INTRODUCTION TO OPENDOORS
  178. --------------------------------------------------------------------------------
  179.  
  180.  
  181.  
  182.  
  183. WELCOME!
  184. --------------------------------------------------------------------------------
  185.  
  186.                Welcome to OpenDoors! The OpenDoors door programming toolkit is a
  187.                powerful and easy to use door toolkit and BBS interface package
  188.                for Turbo C(++) and Borland C++ programmers. OpenDoors provides a
  189.                complete toolkit which allows you to EASILY and QUICKLY write
  190.                spectacular, professional quality BBS doors that automatically
  191.                support all of the popular BBS systems. With OpenDoors, you can
  192.                write door programs just as you would write any other program -
  193.                without having to worry about any of the internal details of door
  194.                programming. OpenDoors takes care of everything for you: It
  195.                handles all modem communications, ANSI/AVATAR graphics support
  196.                and BBS interfacing via door information files (such as DOOR.SYS,
  197.                DORINFO1.DEF, etc.). OpenDoors also looks after status lines and
  198.                sysop function keys for DOS shells, chatting, hanging up, etc..
  199.                In addition, OpenDoors carries out all of the work involved in
  200.                keeping track of carrier detection, user timeouts and much, much
  201.                more. Plus, OpenDoors is can be completely customized, allowing
  202.                you to take as little or as much control of your programs'
  203.                behaviour as you wish - and posing no limit on the possibilities
  204.                of what you can do with this package.
  205.  
  206.  
  207.  
  208.  
  209. FEATURES OF THE OPENDOORS DOOR TOOLKIT
  210. --------------------------------------------------------------------------------
  211.  
  212.                OpenDoors is a complete "door driver" library that allows you to
  213.                write doors that DIRECTLY support one of the largest variety of
  214.                BBS systems, including RemoteAccess, QuickBBS, PC-Board, Maximus,
  215.                Opus, WildCat, WWIV, Spitfire, SuperBBS, Telegard, RBBS-PC,
  216.                TriTel, GAP and others. Interested in writing your own utility
  217.                doors? Perhaps on-line games? Would you even like to get into the
  218.                market of selling your doors for others to use? Or would you
  219.                simply like make your own BBS unique by running "custom" doors?
  220.                With OpenDoors, you can accomplish all of these things - and much
  221.                easier than ever before. Unlike other such "door drivers",
  222.                OpenDoors provides all of the following features:
  223.  
  224.                -  OpenDoors handles all of the "dirty" work involved in writing
  225.                   door programs. Interested in writing doors for BBSes, either
  226.                   your own, or to distribute (even sell!) to other people? Since
  227.                   OpenDoors handles all of the door-related operations for you,
  228.                   you need do next to nothing different when writing door
  229.                   programs than you would when writing any other program. You
  230.                   simply call OpenDoors' simple functions to input, output and
  231.                   control door operation. In fact, many people have converted
  232.  
  233.  
  234. OpenDoors Door Toolkit Manual - Version 4.10                       Page 4
  235.  
  236.  
  237.  
  238.                   non-door programs to door programs in only a matter of minutes
  239.                   using OpenDoors. One of the most common comments I receive
  240.                   about OpenDoors is how easy it is to use.
  241.  
  242.                -  As you would expect, OpenDoors flawlessly monitors carrier
  243.                   detect functions, to automatically recover when a user drops
  244.                   carrier - without your having to do anything extra in your
  245.                   program. OpenDoors also monitors how much time the user has
  246.                   left in the door, and provides a fully-adjustable inactivity
  247.                   timeout monitor.
  248.  
  249.                -  OpenDoors takes care of all the work involved in reading and
  250.                   writing BBS door information files, such as DORINFO1.DEF,
  251.                   EXITINFO.BBS, CHAIN.TXT, DOOR.SYS, etc.  If the particular
  252.                   information is available to OpenDoors, it will provide you
  253.                   with just about everything you could ever want to know about
  254.                   the user on-line, the system your door is running under, and
  255.                   so on.
  256.  
  257.                -  OpenDoors also does all the work involved in displaying and
  258.                   automatically updating the door's RemoteAccess-style status
  259.                   line, with information available to the sysop such as user
  260.                   name, location, baud rate, time left, function keys, ANSI and
  261.                   AVATAR settings, and so on. OpenDoors even keeps track of a
  262.                   user "wants-chat" indicator, just like the one in
  263.                   RemoteAccess, QuickBBS and other BBS systems.
  264.  
  265.                -  OpenDoors automatically provides the sysop with all the
  266.                   standard function keys for adjusting user time, hanging up on
  267.                   or even locking out the user, and so on. OpenDoors also
  268.                   provides you with a chat mode, which is available to the sysop
  269.                   by pressing Alt-C. In addition, the door driver has full
  270.                   support for sysop shell to DOS, activated by the Alt-J key.
  271.  
  272.                -  What's more, OpenDoors is designed to be very easy to use.
  273.                   Even the most novice `C' programmers are able to write
  274.                   professional-quality doors with OpenDoors. It takes care of
  275.                   just about every detail for you, yet still gives you the
  276.                   ability to completely control and customize every detail of
  277.                   your door's behaviour. There are even people who begin door
  278.                   programming with OpenDoors, having never programmed in C in
  279.                   the past.
  280.  
  281.                -  OpenDoors has full support for locked baud-rates of up to
  282.                   38,400 baud, using the FOSSIL driver for maximum compatibility
  283.                   with any system. To output text in your door, you simply call
  284.                   one print function. This function looks after all
  285.                   communication with the modem, and also echos the output to the
  286.                   local screen (referred to as twining the output). OpenDoors
  287.                   also automatically detects if the BBS is operating in local
  288.                   mode, and will function as expected.
  289.  
  290.                -  Other OpenDoors functions include a built in sysop-page
  291.                   function that will ask the user why they wish to chat, and
  292.                   then proceed to page the sysop, just as any BBS package would.
  293.                   OpenDoors also provides screen clearing functions (which will
  294.  
  295.  
  296. OpenDoors Door Toolkit Manual - Version 4.10                       Page 5
  297.  
  298.  
  299.  
  300.                   detect whether the user has screen clearing turned on), and
  301.                   various ANSI/AVATAR control functions (which again detect if
  302.                   the user has graphics mode turned on).
  303.  
  304.                -  As if this weren't enough OpenDoors is also DesqView aware.
  305.                   When OpenDoors starts up, it will automatically check for the
  306.                   presence of DesqView, and if available, will perform all of
  307.                   it's screen output through DesqView.
  308.  
  309.                -  OpenDoors has a number of special sub-systems that you may
  310.                   elect to include in your doors. Among these, are a log-file
  311.                   system that allows you to add log file support to your doors
  312.                   with only a single line of programming.
  313.  
  314.                -  Another valuable OpenDoors sub-system is the configuration
  315.                   file system. Again using only a single line of code, you can
  316.                   add configuration file support to your doors. OpenDoors
  317.                   configuration files permit the sysop using the door to
  318.                   customize the door's performance to their own preferences.
  319.                   Among the settings available in the configuration file are
  320.                   system directories, screen colours, maximum time permitted
  321.                   within the door, sysop paging hours, memory swapping options.
  322.                   The sysop can also specify a custom door information file
  323.                   (drop file) format, to allow your doors to operate on
  324.                   literally ANY BBS system.
  325.  
  326.                -  OpenDoors can also be fully customized in order that you may
  327.                   write door programs that use languages other than English.
  328.  
  329.                -  Among the ANSI / AVATAR features found in OpenDoors is the
  330.                   ability to send ANSI / AVATAR files from disk. This allows you
  331.                   to easily design program screens, and incorporate them into
  332.                   your doors.
  333.  
  334.                -  OpenDoors also comes with the source code for a user-voting
  335.                   door, EZVOTE, that you can modify, or simply extract bits and
  336.                   pieces for use in your own doors. Plus, this manual contains
  337.                   many examples of C source code, to help you in writing nearly
  338.                   any door program you might wish to build. A number of other
  339.                   example programs are also included with the package.
  340.  
  341.                -  You may also elect to purchase the source code for OpenDoors,
  342.                   which will permit you to make modifications to any portion of
  343.                   OpenDoors, use any portions of the OpenDoors source code in
  344.                   other programs you write, or merely learn how communications-
  345.                   type programs are written.
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358. OpenDoors Door Toolkit Manual - Version 4.10                       Page 6
  359.  
  360.  
  361.  
  362. --------------------------------------------------------------------------------
  363. CHAPTER 2 - ABOUT THE DEMO VERSION AND ORDERING
  364. --------------------------------------------------------------------------------
  365.  
  366.  
  367.  
  368.  
  369. THE DEMO VERSION & BENEFITS OF REGISTERING
  370. --------------------------------------------------------------------------------
  371.  
  372.                This archive contains the demo version of OpenDoors. This version
  373.                has all the features of the registered version, but can only be
  374.                used under limited circumstances:
  375.  
  376.                1.) The demo (unregistered) version may only be used for a
  377.                    reasonable evaluation period, for evaluation purposes.
  378.  
  379.                2.) Programs written in this version may not be distributed.
  380.  
  381.  
  382.                Also, any program written in the demo version will display a
  383.                message to the user indicating that it is not registered. This
  384.                message is, of course, removed in the registered version.
  385.  
  386.                If you decided to purchase OpenDoors, you will become the owner
  387.                of a powerful tool for creating BBS door and utility programs.
  388.                Registered owners of OpenDoors are entitled to:
  389.  
  390.                1.) Unlimited use of OpenDoors. You may write as many programs as
  391.                    you wish using OpenDoors, and do what you please with these
  392.                    programs. They may be freely distributed, or even sold.
  393.                    What's more, there are no additional royalty fees. Your one
  394.                    time purchase of OpenDoors entitles you to use it as you
  395.                    please.
  396.  
  397.                2.) You also be entitled to free upgrades to newer versions of
  398.                    OpenDoors. In addition to the great many features and the
  399.                    quality that this version of OpenDoors has to offer, I am
  400.                    currently working on a great many additions and enhancements
  401.                    for the next version. (See the end of this document for an
  402.                    outline of features currently "in the works") Any programs
  403.                    you write in this version will also automatically take on
  404.                    these new features when you receive the new version.
  405.  
  406.  
  407.                The best news of all is how cheap OpenDoors is! Other  "door-
  408.                drivers" sell for $50, $75, or even more! However, this version
  409.                of OpenDoors will only cost you $28! (Also, you may be interested
  410.                in knowing that the price will go up in future versions, so if
  411.                you register now, you will save by getting ALL future upgrades
  412.                for free.)
  413.  
  414.                Also, the source code for OpenDoors is now available to
  415.                registered users for an additional $28! Ordering a copy of the
  416.                source code will allow you to customize OpenDoors for your own
  417.                use, making any changes or additions that you wish. It also gives
  418.  
  419.  
  420. OpenDoors Door Toolkit Manual - Version 4.10                       Page 7
  421.  
  422.  
  423.  
  424.                you the opportunity to see how OpenDoors works, and to use any
  425.                portions of the OpenDoors code in any other programs you wish to
  426.                write. If you think you might be interested in ordering the
  427.                OpenDoors source code, please be sure to read the section
  428.                entitled "Ordering The Source Code", located on page 15.
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482. OpenDoors Door Toolkit Manual - Version 4.10                       Page 8
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490. HOW TO ORDER
  491. --------------------------------------------------------------------------------
  492.  
  493. PLEASE         Below are detailed instructions for registering OpenDoors.
  494. NOTE           These instructions are not intended to seem confusing or
  495.                complicated; they are simply meant to answer almost any question
  496.                that you might have about registering. However, note that it is
  497.                probably not necessary for you to worry about whether you are
  498.                following these steps to the letter - I'm not that picky. So long
  499.                as you send your registration form and fee by some means, there
  500.                should not be any difficulty in processing your registration. If
  501.                you do have any questions or uncertainties about your
  502.                registration, please feel more than free to contact me. For
  503.                information on how to contact me, please see page 173.
  504.  
  505.                To order OpenDoors, simply follow these three steps:
  506.  
  507.                1.)  Fill out the registration form. Information on filling out
  508.                     the form is located on page 11.
  509.  
  510.                2.)  Send the appropriate payment, $28 for the registration or
  511.                     $56 for both the registration and source code. If you wish
  512.                     more detailed instructions on sending the registration fee,
  513.                     see the section that begins page on 13.
  514.  
  515.                3.)  Send the above two items (along with a diskette and envelope
  516.                     if you are ordering the source code, and wish to receive it
  517.                     by mail) to me at:
  518.  
  519.                               Brian Pirie
  520.                               Apt. 1416 - 2201 Riverside Dr.
  521.                               Ottawa, Ontario
  522.                               Canada
  523.                               K1H 8K9
  524.  
  525.  
  526.                If you think you might also be interested in the OpenDoors source
  527.                code, be sure to read the section on the source code, which
  528.                begins on page 15.
  529.  
  530.                Keep in mind that the registration form in this package is only
  531.                used for registering the OpenDoors door toolkit. If you are also
  532.                using the OpenDoors BBS interface package, you must register it
  533.                by sending the separate registration form contained in that
  534.                package. However, if you have both packages and wish to register
  535.                both of them at the same time, you may send both registrations
  536.                together, and must only make out a single cheque for the total of
  537.                both registrations.
  538.  
  539.                Also, you may wish to send the OpenDoors feedback form (located
  540.                on page 18), along with your registration. The feedback form
  541.                gives you a chance to tell me what you think about OpenDoors, and
  542.  
  543.  
  544. OpenDoors Door Toolkit Manual - Version 4.10                       Page 9
  545.  
  546.  
  547.  
  548.                what changes you would like to see in future versions. In fact,
  549.                the majority of suggestions made on suggestion forms in the past
  550.                have already been implemented in more recent versions of
  551.                OpenDoors.
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606. OpenDoors Door Toolkit Manual - Version 4.10                       Page 10
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614. FILLING OUT THE REGISTRATION FORM
  615. --------------------------------------------------------------------------------
  616.  
  617.                If you have printed the OpenDoors manual, you can simply remove
  618.                and mail the forms on pages 17 and 18. If you have not already
  619.                printed a copy of the manual, and you have a printer, you can
  620.                quickly print these forms by printing the ORDER.FRM file included
  621.                in the OpenDoors distribution archive. (Type COPY ORDER.FRM PRN
  622.                from your DOS prompt.)
  623.  
  624. NO PRINTER?    Alternatively, if you do not have a printer, simply send a hand-
  625.                drawn version of the order form.
  626.  
  627.                If you have any special instructions for me, or anything that you
  628.                would like to say when you register, feel free to write this down
  629.                on the back of the registration form, or on a separate piece of
  630.                paper.
  631.  
  632.                When filling out the OpenDoors registration form, be sure to
  633.                indicate how you would prefer to receive your OpenDoors
  634.                registration key and/or source code. You will have the choice of
  635.                receiving your registration key and/or source code by one of
  636.                three means: conventional mail, FidoNet CrashMail, or by a call
  637.                to your BBS. Although I try to send all orders the same day that
  638.                I receive your order form, if you have a FidoNet Email address,
  639.                FidoNet CrashMail is still by far the quickest way to receive
  640.                your order. Once you have decided which means you would prefer to
  641.                receive your order by, please read the detailed instructions on
  642.                your order method, below. Also, if you are ordering the source
  643.                code, please be sure to read the section which begins on page 15.
  644.  
  645.  
  646. --------------------------------------------------------------------------------
  647. RECEIVING      In order to receive your OpenDoors registration key and/or
  648. ORDER          source code by conventional mail, simply fill out the order
  649. BY MAIL        form and mail it along with your payment as described below. I
  650.                will cover the cost of postage. If you are ordering the source
  651.                code (requiring the mailing of a diskette), or your address
  652.                contains non-Arabic characters, also enclose a self-addressed
  653.                envelope.
  654.  
  655.                If you are also ordering the source code, please be sure to
  656.                enclose either a 5-1/4" 360K or 3-1/2" 720K/1.44M floppy disk.
  657.  
  658.  
  659. --------------------------------------------------------------------------------
  660. RECEIVING      In order to receive your OpenDoors registration key and/or
  661. BY CALL        source code by a message and/or upload to your BBS, fill out
  662. TO BBS         the order form and mail it along with your payment as described
  663.                below. Be sure to include the phone number, baud rate, and my
  664.                login and password for the BBS to which you would like me to
  665.                call. As always, I will cover any long distance costs. If, for
  666.  
  667.  
  668. OpenDoors Door Toolkit Manual - Version 4.10                       Page 11
  669.  
  670.  
  671.  
  672.                some reason, I am unable to connect to your BBS (not because it
  673.                is busy, but, for example, if your BBS is no longer online), I
  674.                will send your order by conventional mail instead.
  675.  
  676.  
  677. --------------------------------------------------------------------------------
  678. RECEIVING      In order to receive your OpenDoors registration key and/or
  679. ORDER BY       source code by FidoNet CrashMail, simply fill out the order
  680. FIDONET        form and mail it along with your payment as described below.
  681. CRASHMAIL      Be sure to include the FidoNet node address to which you wish to
  682.                have your registration key and/or source code sent to (via
  683.                CrashMail). Again I will cover any long distance costs. If, for
  684.                some reason, I am unable to connect to your FidoNet system, I
  685.                will send your order by conventional mail instead.
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. OpenDoors Door Toolkit Manual - Version 4.10                       Page 12
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738. SENDING YOUR ORDER FEE
  739. --------------------------------------------------------------------------------
  740.  
  741.                As mentioned before, the OpenDoors registration fee is only $28
  742.                in either Canadian or U.S. currency, or the equivalent in funds
  743.                from any other country. You may also elect to receive the
  744.                OpenDoors source code for an additional $28 (ie. $56 for both
  745.                your OpenDoors registration, and the source code). I are able to
  746.                accept your order fee in any of the following forms:
  747.  
  748.                -Cheque or Money Order in Canadian currency, drawn upon a
  749.                 Canadian bank. In this case, your order fee will be either
  750.                 $28CDN for just the registration, or $56CDN for both the
  751.                 registration and source code.
  752.  
  753.                -Cheque or Money Order in U.S. currency, drawn upon a U.S. bank.
  754.                 In this case, your order fee will be either $28US for just the
  755.                 registration, or $56US for both the registration and source
  756.                 code.
  757.  
  758.                -An International Money Order or International Bank Draft
  759.                 (available from your bank, post office or organization such as
  760.                 American Express), in Canadian currency. Depending on the
  761.                 particular case, your order fee MAY be sent to me by the postal
  762.                 service, and you will mail your order form by itself. You
  763.                 should have the money order drawn in either $28CDN for just the
  764.                 registration, or $56CDN for both the registration and source
  765.                 code.
  766.  
  767.                -A cheque drawn on any bank in the world, IN THAT COUNTRIES
  768.                 CURRENCY, equivalent to 28 Canadian or U.S. dollars. For
  769.                 instance, a cheque for the appropriate number of British
  770.                 Pounds, drawn on a British bank, is perfectly acceptable.
  771.                 However, I am unable to accept a cheque for $28 Canadian
  772.                 dollars, drawn on a British Bank.
  773.  
  774.                -Cash, $28 for the just registration, or $56 for both the
  775.                 registration and source code, in either Canadian or U.S.
  776.                 currency. Please note that it is not usually recommended that
  777.                 cash be sent in the mail, and that I cannot be responsible for
  778.                 any cash lost in the mail. Simply put, if you wish to order by
  779.                 cash, it is your responsibility to get the cash to me. However,
  780.                 if I do receive your order in the form of cash, it will be
  781.                 perfectly acceptable to me. I would like to mention that many
  782.                 people have already ordered OpenDoors by sending cash, and I
  783.                 have yet to run across any case of cash being lost in the mail.
  784.                 Nonetheless, if you wish to send cash, you may wish to consider
  785.                 doing so by registered mail, for your added security.
  786.  
  787.  
  788.                If you are ordering OpenDoors from within Canada, you will most
  789.                likely choose the first option (a Canadian cheque or money
  790.  
  791.  
  792. OpenDoors Door Toolkit Manual - Version 4.10                       Page 13
  793.  
  794.  
  795.  
  796.                order). If you are ordering OpenDoors from within the United
  797.                States, you will most likely choose the second option (an
  798.                American cheque or money order). If you are ordering from outside
  799.                Canada and the U.S., it would be ideal if you could send your fee
  800.                by an international money order. However, it should be noted that
  801.                any of the above order methods will be acceptable from any
  802.                location. Also, it is quite possible that I may be able to accept
  803.                other means of sending your order fee. If you are unsure about
  804.                sending your order fee, please feel free to get in touch with me
  805.                by any of the means listed on page 173.
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854. OpenDoors Door Toolkit Manual - Version 4.10                       Page 14
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. ORDERING THE SOURCE CODE
  863. ------------------------------------------------------------------------------
  864.  
  865.                There are many benefits to also ordering the source code along
  866.                with your OpenDoors registration. Ordering the source code will
  867.                allow you to customize OpenDoors for your own use, use parts of
  868.                the OpenDoors source code in other programs, and learn more about
  869.                how OpenDoors works. If you have any ideas for changes that you
  870.                would like to see in OpenDoors, either large or small, ordering
  871.                the source code will allow you to makes these changes yourself,
  872.                creating your own customized version of OpenDoors. You will be
  873.                able to remove copyright notices, change the way certain
  874.                OpenDoors functions work, or add new capabilities to OpenDoors in
  875.                surprisingly little time. You will also be able to use any of the
  876.                OpenDoors source code, be it the DesqView-aware code, EMS/disk
  877.                swapping routines, configuration file system, communications
  878.                routines, or anything else, in any other programs that you may
  879.                wish to write. Also, ordering the OpenDoors source code will
  880.                allow you to learn more about how OpenDoors works, and how to
  881.                program communications software, door programs, BBS utilities,
  882.                and so on.
  883.  
  884.                As mentioned before, registered users may order the OpenDoors
  885.                source code for an additional $28, either at the same time you
  886.                register OpenDoors, or separately. If you wish to order the
  887.                OpenDoors source code, simply indicate on your order form that
  888.                you wish to order both your OpenDoors registration, and your
  889.                source code, and include the additional fee for ordering the
  890.                source code.
  891.  
  892.                When you order the OpenDoors source code, you will receive the
  893.                source code package. The source code package includes all of the
  894.                source code, with the exception of the registration key decoding
  895.                algorithm. This small piece of code is instead included in the
  896.                form of .OBJect files, one for each memory model. The source code
  897.                package also includes a short "Source Code Manual", with a
  898.                description of how the OpenDoors source code is organized,
  899.                instructions on how to recompile the source code, and more. In
  900.                addition, the source code package includes a full set of batch
  901.                files for automatically re-compiling the OpenDoors libraries.
  902.  
  903.                In order to re-compile the OpenDoors source code, we would
  904.                recommend that you have Turbo C++ 1.00 or later, or any version
  905.                of Borland C++. If you are using Turbo C 2.00 or earlier, you
  906.                will have to make a few minor alterations to the source code in
  907.                order to re-compile it with your compiler.
  908.  
  909.                Also, as with your OpenDoors registration, when you order the
  910.                OpenDoors source code, you are entitled to receive all future
  911.                versions of the source code.
  912.  
  913.  
  914.  
  915.  
  916. OpenDoors Door Toolkit Manual - Version 4.10                       Page 15
  917.  
  918.  
  919.  
  920. IMPORTANT      If you wish to order the source code there are a few important
  921.                things which you should note. First of all, if you choose to
  922.                receive your source code by mail (as opposed to upload to your
  923.                BBS, or FidoNet CrashMail), be sure to enclose a Double-Density
  924.                5-1/4" diskette with mailing envelope, or either Double-Density
  925.                or High-Density 3-1/2" diskette. Also, due to the costs of over-
  926.                seas long distance, an extra $15 is required in order to send the
  927.                OpenDoors source code by BBS upload or FidoNet CrashMail to any
  928.                sites outside of North America. There is no extra cost for
  929.                sending the source code by BBS upload or FidoNet CrashMail within
  930.                North America. Nor is there any extra cost for having it sent by
  931.                conventional mail in or outside North America.
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978. OpenDoors Door Toolkit Manual - Version 4.10                       Page 16
  979.  
  980.  
  981.  
  982. ---------------------------------------------------------------------------
  983.               OPENDOORS DOOR PROGRAMMING TOOLKIT 4.10 - ORDER FORM
  984. ---------------------------------------------------------------------------
  985.  
  986.          YOUR NAME : _______________________________   (AS SHOULD APPEAR IN
  987.                                                         REGISTRATION)
  988.     POSTAL ADDRESS : ______________________________________________________
  989.  
  990.                      ______________________________________________________
  991.  
  992. VOICE PHONE NUMBER : ______________________
  993.  
  994.  NETWORK ADDRESSES : ____________________________________   (IF APPLICABLE)
  995.  
  996.   BBS PHONE NUMBER : ______________________                 (IF APPLICABLE)
  997.  
  998.  BEST TIME TO CALL : __________________       BRIAN'S PASSWORD : __________
  999.           (ONLY IF YOU WISH TO RECEIVE YOUR ORDER BY A MESSAGE ON YOUR BBS)
  1000.  
  1001.                                 ___
  1002. I WISH TO RECEIVE MY ORDER BY: |   | - FIDONET "CRASHMAIL"
  1003.                                |___|
  1004.                                 ___
  1005.                                |   | - CALL TO MY BBS
  1006.                                |___|
  1007.                                 ___
  1008.                                |   | - CONVENTIONAL MAIL
  1009.                                |___|
  1010.  
  1011.                         ___
  1012. I WOULD LIKE TO ORDER: |   | - JUST MY REGISTRATION KEY, FOR $28
  1013.                        |___|
  1014.                         ___
  1015.                        |   | - JUST THE SOURCE CODE (ONLY IF ALREADY
  1016.                        |___|   REGISTERED), FOR $28
  1017.                         ___
  1018.                        |   | - BOTH REGISTRATION KEY AND SOURCE CODE,
  1019.                        |___|   FOR $56
  1020.  
  1021.  
  1022.  
  1023. I HAVE ALSO SENT THE APPROPRIATE ORDER FEE, PAYABLE TO BRIAN PIRIE.
  1024.  
  1025.                                                ____________________________
  1026.                                                (SIGNATURE)
  1027.  
  1028.                MAIL TO:   BRIAN PIRIE
  1029.                           APT. 1416 - 2201 RIVERSIDE DR.
  1030.                           OTTAWA, ONTARIO
  1031.                           CANADA
  1032.                           K1H 8K9
  1033.  
  1034. +-- OFFICE USE ONLY ------------------------------------------------------+
  1035. |                                                                         |
  1036. | Rcvd : _______  Date : _________  S.N. : _________  Key : _____________ |
  1037. +-------------------------------------------------------------------------+
  1038.  
  1039.  
  1040. OpenDoors Door Toolkit Manual - Version 4.10                       Page 17
  1041.  
  1042.  
  1043.  
  1044. ---------------------------------------------------------------------------
  1045.           OPENDOORS DOOR PROGRAMMING TOOLKIT 4.10 - USER FEEDBACK FORM
  1046. ---------------------------------------------------------------------------
  1047.  
  1048.          YOUR NAME : _______________________________
  1049.  
  1050.     POSTAL ADDRESS : ______________________________________________________
  1051.  
  1052.                      ______________________________________________________
  1053.  
  1054. VOICE PHONE NUMBER : ______________________
  1055.  
  1056.  NETWORK ADDRESSES : ____________________________________   (IF APPLICABLE)
  1057.  
  1058.  
  1059. WHERE DID YOU RECEIVE YOUR COPY OF OPENDOORS?
  1060.  
  1061.              ____________________________________________________________
  1062.  
  1063.  
  1064. WHICH COMPILER AND VERSION ARE YOU USING?  (EG. BORLAND C++ 3.00)
  1065.  
  1066.              ____________________________________________________________
  1067.  
  1068.  
  1069. WHAT DO YOU LIKE MOST ABOUT OPENDOORS?
  1070.  
  1071.              ____________________________________________________________
  1072.  
  1073.              ____________________________________________________________
  1074.  
  1075.              ____________________________________________________________
  1076.  
  1077.  
  1078. WHAT CHANGES OR ADDITIONS WOULD YOU LIKE TO SEE IN FUTURE VERSIONS?
  1079.  
  1080.              ____________________________________________________________
  1081.  
  1082.              ____________________________________________________________
  1083.  
  1084.              ____________________________________________________________
  1085.  
  1086.  
  1087. DO YOU HAVE ANY ADDITIONAL COMMENTS?
  1088.  
  1089.              ____________________________________________________________
  1090.  
  1091.              ____________________________________________________________
  1092.  
  1093.              ____________________________________________________________
  1094.  
  1095.  
  1096. ------------------------------------------------------------------------------
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102. OpenDoors Door Toolkit Manual - Version 4.10                       Page 18
  1103.  
  1104.  
  1105.  
  1106. ------------------------------------------------------------------------------
  1107. CHAPTER 3 - LEARNING THE BASICS OF OPENDOORS
  1108. ------------------------------------------------------------------------------
  1109.  
  1110.  
  1111.  
  1112.  
  1113. ABOUT THIS MANUAL
  1114. ------------------------------------------------------------------------------
  1115.  
  1116.                The OpenDoors programmer's manual is intended to serve as a
  1117.                complete tutorial, guide and reference to writing programs with
  1118.                OpenDoors. Chapter 1 of this manual, beginning on page 4, serves
  1119.                as an introduction and overview of the features of OpenDoors.
  1120.                Chapter 2, beginning on page 7, then contains all of the
  1121.                information related to this demo version of OpenDoors, and how to
  1122.                register your copy. This chapter then serves as a tutorial on
  1123.                OpenDoors and door programming in general. Chapter 4 then deals
  1124.                with the functions which OpenDoors provides for door programming.
  1125.                Chapter 5 deals with the "OpenDoors control structure", which
  1126.                gives you access to a wide array of information, and allows you
  1127.                to customize OpenDoor's appearance and behaviour.
  1128.  
  1129.                Chapter 6 (which begins on page 168) is perhaps the most
  1130.                important single part of this manual. This chapter gives detailed
  1131.                instructions on troubleshooting programs written with OpenDoors,
  1132.                lists solutions to common difficulties, and has information about
  1133.                the many sources for OpenDoors support. If at any time you are
  1134.                having difficulty with OpenDoors, be sure to refer to this
  1135.                chapter for complete step-by-step instruction on tracing the
  1136.                source of your problem, and for solutions to common difficulties
  1137.                with OpenDoors. This chapter also directs you to some of the many
  1138.                means of OpenDoors support, including information on the
  1139.                OpenDoors EchoMail conference, the OpenDoors support BBS, and how
  1140.                to get in touch with me.
  1141.  
  1142.                You will also find many useful tools in this manual, which will
  1143.                no doubt come in useful while working with OpenDoors. Beginning
  1144.                on page 2 is a basic table of contents, showing you have the
  1145.                manual is organized, and helping you to locate general topics. At
  1146.                the end of the manual, beginning on page 200, is an index to help
  1147.                you locate more information on specific topics. The manual also
  1148.                includes a glossary, on page 192, which will help you in
  1149.                understanding new terms that you may come across while reading
  1150.                the manual. At the end of the manual, you will also find several
  1151.                useful section, such as a brief history of OpenDoors, information
  1152.                on how to contact us, and information about new OpenDoors
  1153.                features currently in the works.
  1154.  
  1155.                It is suggested that if you wish to get the most out of
  1156.                OpenDoors, that you carefully read the sections of the manual
  1157.                that describe the use of the features you are using, and at least
  1158.                skim other portions of the manual to find out what additional
  1159.                features are available. Also, you will likely want to print this
  1160.                manual, to make reading and reference while programming easier.
  1161.  
  1162.  
  1163.  
  1164. OpenDoors Door Toolkit Manual - Version 4.10                       Page 19
  1165.  
  1166.  
  1167.  
  1168.                To print this manual, simply type the following line from your
  1169.                DOS prompt:
  1170.  
  1171.                               COPY OPENDOOR.DOC PRN:
  1172.  
  1173.  
  1174.  
  1175.  
  1176. COMPILING A PROGRAM WITH OPENDOORS
  1177. --------------------------------------------------------------------------------
  1178.  
  1179.                The process of compiling a program written with OpenDoors is very
  1180.                similar to that of compiling any other program. However, there
  1181.                are two additional steps which you must be sure to remember:
  1182.  
  1183.                1.)  To include the OPENDOOR.H header file.
  1184.  
  1185.                2.)  To link your program with the appropriate OpenDoors library
  1186.                     file.
  1187.  
  1188.  
  1189.                All programs written with OpenDoors, must "include" the
  1190.                OPENDOOR.H header file. This is easily accomplished by placing
  1191.                the line #include "OPENDOOR.H" at the beginning of your program's
  1192.                .C file.
  1193.  
  1194.                You must also "link" the OpenDoors library file with your
  1195.                program. The recommended way of doing this is by including the
  1196.                appropriate library in your project file. If you are unfamiliar
  1197.                with the process of using project files, please refer to your
  1198.                Turbo C(++)/Borland C++ manuals. Simply put, if you are using
  1199.                Turbo C, you should create a text file with a .PRJ file, and list
  1200.                in this text file the name of your program's .C file, along with
  1201.                the name of the appropriate library file. You should then select
  1202.                this .PRJ project file from within Turbo C, prior to compiling
  1203.                your program. If you are using Turbo C++ or Borland C++, you can
  1204.                create a project file by selecting the "Open" command from the
  1205.                "Project" menu. Simply type in the name of a new .PRJ project
  1206.                file to create, and then "Add" the name of your program's .C
  1207.                file, along with the name of the appropriate OpenDoors library.
  1208.                Again, whenever you wish to compile your program simply load the
  1209.                project file for that program first.
  1210.  
  1211.                There are a number of different library files included with
  1212.                OpenDoors, one for each memory model. The following chart lists
  1213.                the library file names, along with their corresponding memory
  1214.                model. It is important that you use the library file which
  1215.                corresponds to the memory model you are using.
  1216.  
  1217.                If you are unfamiliar with the concept of memory models, you
  1218.                should refer to your C programming manuals. Simply put, within
  1219.                Turbo C(++)/Borland C++, you must select the memory model you
  1220.                wish to use when compiling your program. In order for your
  1221.                program to compile correctly, you must also include the library
  1222.                file which corresponds to the memory model you have selected.
  1223.  
  1224.  
  1225.  
  1226. OpenDoors Door Toolkit Manual - Version 4.10                       Page 20
  1227.  
  1228.  
  1229.  
  1230.                   +------------------------------------------------+
  1231.                   | Library     | Memory                           |
  1232.                   | Filename    | Model                            |
  1233.                   +-------------+----------------------------------|
  1234.                   | ODOORS.LIB  | The Small memory model library   |
  1235.                   |             |                                  |
  1236.                   | ODOORM.LIB  | The Medium memory model library  |
  1237.                   |             |                                  |
  1238.                   | ODOORC.LIB  | The Compact memory model library |
  1239.                   |             |                                  |
  1240.                   | ODOORL.LIB  | The Large memory model library   |
  1241.                   |             |                                  |
  1242.                   | ODOORH.LIB  | The Huge memory model library    |
  1243.                   +------------------------------------------------+
  1244.  
  1245.                For more information on including third-party libraries in your
  1246.                programs, please also see your Turbo C(++) / Borland C++ manuals.
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288. OpenDoors Door Toolkit Manual - Version 4.10                       Page 21
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296. BASICS OF DOOR PROGRAMMING WITH OPENDOORS
  1297. --------------------------------------------------------------------------------
  1298.  
  1299.                This section provides a complete tutorial to the basics of door
  1300.                programming with OpenDoors. It is important that you read this
  1301.                section, as while OpenDoors allows you to write door programs in
  1302.                almost the same manner as you would any "normal" program, there
  1303.                are a few things which you must keep in mind, in order that your
  1304.                door functions correctly. We would also encourage you to look at
  1305.                the sample door included with OpenDoors, EZVote. This program,
  1306.                which is described beginning on page 25, will give you a much
  1307.                better idea of what an OpenDoors door will look like, and
  1308.                provides you with a starting point for writing your own doors.
  1309.  
  1310.                Perhaps the best means of introduction to door programming with
  1311.                OpenDoors is by doing it yourself. As such, it would probably be
  1312.                a good idea for you to try typing in, compiling and running the
  1313.                simple introduction program below. For instructions on compiling
  1314.                programs written with OpenDoors, see page 20.
  1315.  
  1316.                     #include "opendoors.h"
  1317.  
  1318.                     main()
  1319.                        {
  1320.                        od_printf("Welcome to my first Door!\n\r");
  1321.                        od_printf("Press a key to return to BBS!\n\r");
  1322.                        od_get_key(TRUE);
  1323.                        od_exit(10,FALSE);
  1324.                        }
  1325.  
  1326.                Keep in mind that even this simple program will automatically
  1327.                have all of the door capabilities we have already mentioned.
  1328.                Notice the inclusion of the OPENDOOR.H file. All doors written
  1329.                with OpenDoors must include the OPENDOOR.H header file in order
  1330.                to compile correctly. The first two lines in the main function
  1331.                simply call the OpenDoors printf function (which sends the output
  1332.                to both the modem and the local screen). Notice that the strings
  1333.                displayed by the od_printf() function end with a "\n\r" sequence,
  1334.                instead of the normal "\n". The next line is the OpenDoors
  1335.                single-key input function. The TRUE value causes the system to
  1336.                wait for a key to be pressed (again, either from remote or local
  1337.                keyboard). The last line of the main function then ends the door,
  1338.                returning an errorlevel of 10. The FALSE indicates that you do
  1339.                not wish to have OpenDoors terminate the call (hang up on the
  1340.                user). If you placed a TRUE in its place, then a remote user
  1341.                would be logged off when the door exits. We would strongly
  1342.                encourage you to try compiling and running this program on your
  1343.                own BBS setup. For information on compiling programs with
  1344.                OpenDoors, see the section beginning on page 20. Congratulations,
  1345.                you have written your first door! Feel free to make any changes
  1346.                to this program, and see what effects your changes have.
  1347.  
  1348.  
  1349.  
  1350. OpenDoors Door Toolkit Manual - Version 4.10                       Page 22
  1351.  
  1352.  
  1353.  
  1354.                In case you are not completely familiar with the operation of
  1355.                door programs, we will now provide an introduction to the
  1356.                internals of a door's operation. Keep in mind that OpenDoors
  1357.                automatically carries out most of these tasks for you. When any
  1358.                door program starts up, one of the first things it must do is to
  1359.                read the door information file(s) passed to it by the BBS . When
  1360.                a user is on-line, and wishes to run a door, they will most
  1361.                likely select a command from a menu. At this point, the BBS
  1362.                system (such as RemoteAccess, Maximus, or whatever), will create
  1363.                a file of information about the system, who is on-line, and so
  1364.                on. Various BBS packages produce various styles of door
  1365.                information files. OpenDoors recognizes a wide variety of door
  1366.                information files, and future versions will recognize others. As
  1367.                a result, your doors will be able to run on a great many
  1368.                different BBS systems.
  1369.  
  1370.                The door itself will actually be loaded in one of two manners.
  1371.                Either the BBS will perform a "shell" and run the door while the
  1372.                BBS system resides in memory (sometimes called a type 7 exit), or
  1373.                it will exit to a batch file, which will trap an errorlevel and
  1374.                load the appropriate door. (sometimes called a type 15 exit). In
  1375.                either case, when the door gains control, it will first read the
  1376.                door information file(s), and then begin to communicate with the
  1377.                modem. OpenDoors, as with almost all other BBS software, performs
  1378.                all of its modem communication with the "FOSSIL driver". The
  1379.                FOSSIL driver is loaded either as a .SYS device driver from
  1380.                Config.Sys at boot-up, or from an .EXE file as a TSR program, and
  1381.                provides the BBS software with a standard interface layer for
  1382.                communicating with just about any type of modem. Hence, whenever
  1383.                your door is not running in local mode, it will require a FOSSIL
  1384.                driver, such as X00 or BNU to be loaded.
  1385.  
  1386.                Fortunately, OpenDoors takes care of all the work involved in
  1387.                detecting and reading the door information file, and then
  1388.                initializing and communicating with the FOSSIL driver for you. In
  1389.                order to carry out these tasks, along with setting up the status
  1390.                line, and so on, OpenDoors provides a function called od_init();.
  1391.                If you do not explicitly call this function, the first call to
  1392.                any other OpenDoors DOOR DRIVER function (such as the first time
  1393.                your door program outputs anything) will automatically cause the
  1394.                od_init function to be called. As a result, upon the first call
  1395.                to an OpenDoors DOOR DRIVER function (but not BBS interface
  1396.                module functions), all of the initialization tasks for the door
  1397.                will automatically be carried out. However, there may be times
  1398.                when you will want your program to have access information about
  1399.                the user who is on-line, or carry out other actions which require
  1400.                od_init() to have been executed - prior to the point where you
  1401.                call any other OpenDoors functions. In this case, you will have
  1402.                to call od_init() yourself before you do any of these things.
  1403.  
  1404.                OpenDoors provides you with a C structure, by the name of
  1405.                od_control, which allows you to access all the available
  1406.                information about the user who is on-line, the system your door
  1407.                is running on, and also allows you to adjust various OpenDoors
  1408.                parameters. Depending on what BBS system your door is running
  1409.                under, the actual information available from the od_control
  1410.  
  1411.  
  1412. OpenDoors Door Toolkit Manual - Version 4.10                       Page 23
  1413.  
  1414.  
  1415.  
  1416.                structure will vary. For more information on the od_control
  1417.                structure, see the section on the control structure, beginning on
  1418.                page 119.
  1419.  
  1420.                Once the door has initialized itself, it will then begin
  1421.                communications with the user who is online. OpenDoors takes care
  1422.                of all communications, through its various input and display
  1423.                functions. When the door has finished, it will then write any
  1424.                information that has changed back to the door information file
  1425.                (if applicable), finish communicating with the modem, and return
  1426.                to the BBS. In OpenDoors, this is accomplished with the od_exit()
  1427.                function. This function will terminate the door's activity,
  1428.                OPTIONALLY hang up on the user (allowing you to provide either
  1429.                return to BBS or logoff options for exiting), and then exit with
  1430.                the specified errorlevel. You *MUST* exit your door by calling
  1431.                the od_exit() function.
  1432.  
  1433.                One other important OpenDoors function that you should be aware
  1434.                of is the od_kernal() function. od_kernal() is the central
  1435.                OpenDoors control function, and is responsible for much of
  1436.                OpenDoors' updating of the status line, monitoring the carrier
  1437.                detect and user timeout status, responding to sysop function
  1438.                keys, and so on. The od_kernal() function is called automatically
  1439.                by OpenDoors, within the other OpenDoors door driver functions.
  1440.                As a result, since most door programs will call some OpenDoors
  1441.                function on a regular basis, you will most often have no need to
  1442.                call the od_kernal() function yourself. However, if your door is
  1443.                going to perform some action, such as updating data files, during
  1444.                which it will not call any OpenDoors door driver function for
  1445.                more than a few seconds, you should then call the od_kernal()
  1446.                function yourself. For more information on the od_kernal()
  1447.                function, see page 85.
  1448.  
  1449.                For more information on the functions available from OpenDoors,
  1450.                or the control structure, see the corresponding sections in this
  1451.                manual. We would also suggest that you have a look at the sample
  1452.                door included with OpenDoors, EZVote.
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474. OpenDoors Door Toolkit Manual - Version 4.10                       Page 24
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482. A SAMPLE DOOR PROGRAM: "EZVOTE"
  1483. -------------------------------------------------------------------------------
  1484.  
  1485.                One of the best ways to see how OpenDoors works, and the
  1486.                potential that it has, is to look at the source code for the
  1487.                included sample door, EZVote. While this is by no means a complex
  1488.                door, it should certainly give you a clear impression of how
  1489.                OpenDoors doors are built, and will likely give you many ideas
  1490.                for your own doors. You can run the door as included in the
  1491.                archive by typing EZVOTE (the archive also contains a sample
  1492.                DORINFO1.DEF file, which will allow you to test any doors in
  1493.                local mode.) If you wish to manually create your own DORINFO1.DEF
  1494.                file, you can do so very easily. The DORINFO1.DEF door
  1495.                information file is a simple text file which lists a different
  1496.                piece of information on each line, in the following format:
  1497.  
  1498.                +----------------------------------------------------------+
  1499.                | LINE NUMBER | DESCRIPTION            | EXAMPLE           |
  1500.                +-------------+------------------------+-------------------|
  1501.                |     1       | Name of the BBS        | MY OWN BBS        |
  1502.                |     2       | Sysop's first name     | BRIAN             |
  1503.                |     3       | Sysop's last name      | PIRIE             |
  1504.                |     4       | Com Port modem is on   | COM0              |
  1505.                |     5       | Baud rate, etc.        | 0 BAUD,N,8,1      |
  1506.                |     6       | Unused                 | 0                 |
  1507.                |     7       | User's first name      | JOHN              |
  1508.                |     8       | User's last name       | PUBLIC            |
  1509.                |     9       | Caller's location      | OTTAWA, ON        |
  1510.                |     10      | ANSI mode (0=off, 1=on)| 1                 |
  1511.                |     11      | User's security level  | 32000             |
  1512.                |     12      | User's time left       | 60                |
  1513.                +----------------------------------------------------------+
  1514.  
  1515.  
  1516.                Feel free to make any changes you wish to the door, and recompile
  1517.                it! One of the best and most enjoyable ways to learn OpenDoors is
  1518.                by experimenting. If you are a registered owner of OpenDoors, you
  1519.                may even distribute your own versions of this door. Also, you may
  1520.                find that EZVote serves as a good framework for building your own
  1521.                doors.
  1522.  
  1523.                The EZVote door behaves similarly to most other door programs,
  1524.                and will have a fair bit in common with any other door you write
  1525.                in OpenDoors. What you see in the output window is identical to
  1526.                what a remote user will be seeing. If the user has ANSI or AVATAR
  1527.                mode turned on, you will see the same colours as they do, and if
  1528.                they have screen clearing turned on, your screen will be cleared
  1529.                when their's is. The status line at the bottom of the screen will
  1530.                list the name of the user currently on-line (if you are using the
  1531.                sample DORINFO1.DEF file, the user's name will be "The Sysop"),
  1532.                the user's location, and the user's baud rate (0 if the door is
  1533.                operating in local mode). You will also be told how much time the
  1534.  
  1535.  
  1536. OpenDoors Door Toolkit Manual - Version 4.10                       Page 25
  1537.  
  1538.  
  1539.  
  1540.                user has left, and there will be indicators as to whether the
  1541.                user has ANSI and/or AVATAR modes on, etc. If the user wishes to
  1542.                Chat with the sysop (ie, they have paged the sysop, but haven't
  1543.                receive a response yet), a [Want-Chat] indicator will be flashing
  1544.                on the status line. Try Paging the sysop, using OpenDoors built
  1545.                in sysop page feature. The following function keys will also be
  1546.                available to the sysop in any OpenDoors door:
  1547.  
  1548.  
  1549.                [UP]/[DOWN] - Use the arrow keys to increase or decrease the
  1550.                              amount of time which the user has left in the door.
  1551.  
  1552.                [Alt]-[C] -   Allows the sysop to break into chat with the user
  1553.                              at any time. [Alt]-[C] again, or [ESC] will end
  1554.                              chat mode. (Notice that the Want-Chat indicator
  1555.                              will also be turned off, if it was flashing. If
  1556.                              your door is running under Apex, RemoteAccess or
  1557.                              QuickBBS, paging from within the door will even
  1558.                              cause the Want-Chat indicator to stay lit when the
  1559.                              user returns to the BBS)
  1560.  
  1561.                [Alt]-[J] -   Allows the sysop to shell to DOS, if enough memory
  1562.                              is available. Simply type EXIT to return to the
  1563.                              door again.
  1564.  
  1565.                [Alt]-[H] -   Hang up on the user. When the sysop does this,
  1566.                              OpenDoors will optionally call a function you have
  1567.                              indicated in the OpenDoors control structure, to
  1568.                              allow you to close files, etc. OpenDoors will then
  1569.                              exit with the appropriate errorlevel:
  1570.  
  1571.                                   0 - A critical error has occurred
  1572.                                   1 - Carrier lost, user off-line
  1573.                                   2 - Sysop terminated call, user off-line
  1574.                                   3 - User time used up, user STILL ON-LINE
  1575.                                   4 - Keyboard inactivity timeout, user
  1576.                                       off-line
  1577.                               5-255 - Defined by your door
  1578.  
  1579.                              These errorlevel will allow sysops using your door
  1580.                              to optionally log the user back on-line, place the
  1581.                              BBS in "wait for call" mode, or whatever they wish,
  1582.                              depending on how the door exited
  1583.  
  1584.                [Alt]-[L] -   This key locks the user out of the BBS. It first
  1585.                              hangs up on the user, and then sets their security
  1586.                              level to 0, to prevent them from ever logging on
  1587.                              again. This feature may require use of the
  1588.                              EXITINFO.BBS file, depending on what system the
  1589.                              door is running under.
  1590.  
  1591.                [Alt]-[K] -   The "User Keyboard-Off" key allows the sysop to
  1592.                              temporarily prevent the user from typing anything
  1593.                              on their keyboard. This has no effect on the local
  1594.                              keyboard, but causes OpenDoors to ignore any
  1595.                              keystrokes from remote.
  1596.  
  1597.  
  1598. OpenDoors Door Toolkit Manual - Version 4.10                       Page 26
  1599.  
  1600.  
  1601.  
  1602.  
  1603.                [Alt]-[N] -   The "Sysop Next" key, this function reserves the
  1604.                              system for use by the sysop after the user logs
  1605.                              off, if the door is running under an Apex or RA
  1606.                              1.00 or later system.
  1607.  
  1608.                [Alt]-[D] -   "Drop to BBS" key. This function allows the sysop
  1609.                              to exit the door and return the user to the BBS,
  1610.                              without hanging up.
  1611.  
  1612.                [F1]..[F10] - The Function keys [F1] thru [F10] allows the sysop
  1613.                              access to various types of information on the
  1614.                              status line, or to turn the status line off. These
  1615.                              keys are as follows:
  1616.  
  1617.                              [F1] -  Display basic door and user information
  1618.                              [F2] -  Display phone numbers and important dates
  1619.                              [F3] -  Display security flags and up/download info
  1620.                              [F4] -  Display system information and current time
  1621.                              [F5] -  Display message info and user's settings
  1622.                              [F6] -  Display chat reason and sysop's comment
  1623.                              [F9] -  Display help information for sysop
  1624.                              [F10] - Turn off the status line
  1625.  
  1626.  
  1627.                Now, let us take a closer look at the actual source code for the
  1628.                EZVote door. If you have not already printed out a copy of this
  1629.                manual, and possibly the EZVOTE.C file as well, it would probably
  1630.                be a good idea to do so now.
  1631.  
  1632.                Notice that near the top of the program, along with all the
  1633.                standard header files, the OPENDOOR.H file is included. This file
  1634.                must be included in all programs written under OpenDoors. If you
  1635.                are placing the OPENDOOR.H file in the same directory as the door
  1636.                you are compiling, simply include the line:
  1637.  
  1638.                                     #include "opendoor.h"
  1639.  
  1640.                in your program. If you are placing the OPENDOOR.H in your
  1641.                include directory, along with the rest of your header files, use
  1642.                the line:
  1643.  
  1644.                                     #include <opendoor.h>
  1645.  
  1646.                You may notice the file structure just before the main function
  1647.                in the EZVote door. EZVote stores its data file of questions,
  1648.                results, and who has voted on what in a single fixed length file
  1649.                called EZVOTE.BBS. This file is simply a memory image of the file
  1650.                structure. The elements in this structure includes the total
  1651.                number of questions, the total number of users that the door
  1652.                knows about, the questions they have and have not voted on, the
  1653.                actual questions and answers themselves, and so on. The execution
  1654.                of the EZVote door begins with the allocation of memory for its
  1655.                file structure.
  1656.  
  1657.  
  1658.  
  1659.  
  1660. OpenDoors Door Toolkit Manual - Version 4.10                       Page 27
  1661.  
  1662.  
  1663.  
  1664.                Next, the EZVote program calls the od_init_with_config()
  1665.                function. This function instructs OpenDoors to begin execution,
  1666.                by reading a configuration file if available, setting up some of
  1667.                its internal storage, reading the door information file (eg.
  1668.                DORINF1.DEF, DOOR.SYS), and begins communicating with the modem
  1669.                (if it is not running in local mode). The od_init_with_config()
  1670.                function is only required if you wish your door to use a
  1671.                configuration file. In this case, od_init_with_config() must be
  1672.                the first OpenDoors function you call. If you do not call the
  1673.                od_init_with_config(), the OpenDoors initialization process will
  1674.                ocurr whenever your program calls its first OpenDoors function.
  1675.                For more information on configuration files in OpenDoors, please
  1676.                see page .
  1677.  
  1678.                The EZVote door also include the optional OpenDoors log file
  1679.                system. To add log file capabilities to a door, the line
  1680.                od_log_open() is simply placed after the od_init_with_config()
  1681.                function. OpenDoors will now automatically include the logfile
  1682.                system, and make the most common logfile entries, such as the
  1683.                time the user enters and exits the door, sysop pages, shell to
  1684.                DOS, and so on.
  1685.  
  1686.                The next line in the main() function of the EZVote door looks as
  1687.                follows:
  1688.  
  1689.                        od_control.od_before_exit=save_file;
  1690.  
  1691.                This line simply tells OpenDoors to call the save_file() function
  1692.                (to save the EZVOTE.BBS data file) before it exits. If you do not
  1693.                wish OpenDoors to call any function before exiting, simply leave
  1694.                this variable set to its default of NULL. Keep in mind that
  1695.                OpenDoors automatically shuts down the door and returns control
  1696.                to the BBS, if it detects that the user's time has expired, if
  1697.                the user has hung up, and so on. As a result, it is possible that
  1698.                OpenDoors could cause your program to exit at any time an
  1699.                OpenDoors door driver is called. Hence, the use of this
  1700.                od_control. od_before_exit variable will allow you to finish any
  1701.                uncompleted activities, such as closing data files, before
  1702.                control is returned to the BBS.
  1703.  
  1704.                After EZVote has performed these door related startup procedures,
  1705.                it opens/creates its EZVOTE.BBS data file. If the EZVOTE.BBS file
  1706.                exists in the current directory, it is opened and read. If the
  1707.                file does not exist, then EZVote creates a new one. Next, EZVote
  1708.                searches through the data file for the name of the user who is
  1709.                currently on-line. This allows EZVote to keep track of all the
  1710.                users who have used it, with its own statistics about them.
  1711.                EZVote also compares the name of the user currently on-line to
  1712.                the name of the system's sysop. If they match, the EZVote will
  1713.                also enable it's sysop-only functions, such as deleting questions
  1714.                from the door.
  1715.  
  1716.                Once EZVote has done all of this housekeeping, it begins to
  1717.                communicate with the user. All of the functions performed by the
  1718.                EZVote door center around the main menu, which is displayed by
  1719.                the main_menu() function. The EZVote door is written in such a
  1720.  
  1721.  
  1722. OpenDoors Door Toolkit Manual - Version 4.10                       Page 28
  1723.  
  1724.  
  1725.  
  1726.                way that the main menu may be either the built-in menu, or one
  1727.                contained in an external, sysop definable, ASCII/ANSI/AVATAR
  1728.                file. Hence, the main_menu() function begins by attempting to
  1729.                display a EZVOTE.ASC/ANS/AVT file, by use of the od_send_file()
  1730.                function. If such a file is found, the od_send_file() function
  1731.                will display the appropriate file corresponding to the current
  1732.                graphics mode, and return a value of TRUE. (For more information
  1733.                on TRUE/FALSE Boolean values, see the entry on "BOOLEAN VALUES",
  1734.                in the glossary.) The EZVote main_menu() function then tests the
  1735.                value returned by the od_send_file() function. If the
  1736.                od_send_file() function was unable to find the appropriate file,
  1737.                OpenDoors proceeds to display its built-in main menu. Before the
  1738.                main menu is displayed, you will notice that the screen is
  1739.                cleared (the od_clr_scr() function only clears the screen if the
  1740.                user has screen clearing mode turned on), as well as the keyboard
  1741.                input buffer. The keyboard buffer is cleared by the
  1742.                od_clear_keybuffer() function, in order to prevent unwanted
  1743.                behaviour, if the user has been pressing keys on their keyboard
  1744.                while the door was loading, etc. While all the internal OpenDoors
  1745.                functions check for ANSI/AVATAR mode, EZVote also checks the
  1746.                status of the od_control.user_ansi variable. This allows it to
  1747.                only display extended characters (such as the line and box
  1748.                drawing characters) to users who have ANSI/AVATAR capabilities.
  1749.  
  1750.                Menu display is accomplished using the od_disp_str() function.
  1751.                Also note that when using the OpenDoors display functions you
  1752.                must end a line with the "\n\r" sequence, instead of the single
  1753.                "\n" that you would use with the C printf() function. In door
  1754.                program, both the "\n" (line feed) and "\r" (carriage return)
  1755.                characters must be sent to the modem, in order that the text is
  1756.                displayed correctly on the remote user's screen.
  1757.  
  1758.                The remainder of the EZVote door should be more or less self-
  1759.                explanatory. To learn more about OpenDoors and door programming,
  1760.                you should now continue to look through the following chapter,
  1761.                which describes the functions that you can use when creating
  1762.                doors with OpenDoors. You will probably also be interested in
  1763.                looking at, compiling, testing and altering the other example
  1764.                programs included in the OpenDoors package. There are also a
  1765.                number of example programs throughout this manual, that will help
  1766.                to demonstrate how you can accomplish various things using
  1767.                OpenDoors.
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784. OpenDoors Door Toolkit Manual - Version 4.10                       Page 29
  1785.  
  1786.  
  1787.  
  1788.  
  1789. --------------------------------------------------------------------------------
  1790. CHAPTER 4 - THE OPENDOORS DOORDRIVER FUNCTIONS
  1791. --------------------------------------------------------------------------------
  1792.  
  1793.  
  1794.  
  1795.  
  1796. AN OVERVIEW OF THE FUNCTIONS
  1797. -------------------------------------------------------------------------------
  1798.  
  1799.                All of the activities of an OpenDoors door program are
  1800.                coordinated through one of two facilities - the door driver
  1801.                functions, and the OpenDoors door control structure.
  1802.  
  1803.                Any door program written with the OpenDoors door driver will have
  1804.                to make use of the OpenDoors door driver functions for all of its
  1805.                door-related input and output. The OpenDoors door driver
  1806.                functions also provide many capabilities to your door programs,
  1807.                such as displaying ASCII/ANSI/AVATAR files, controlling the
  1808.                door's operation, and so on.
  1809.  
  1810.                You should also note that much of the information about the user
  1811.                who is online, information about the system your door is running
  1812.                under, and variables to customize OpenDoors' behavior, are
  1813.                accessed not through the door driver functions, but the OpenDoors
  1814.                control structure. The control structure is described in the
  1815.                section beginning on page 119.
  1816.  
  1817.                Below, the door driver function available to door programs
  1818.                written with OpenDoors are listed, grouped according to general
  1819.                categories of functionality. On the following pages, the
  1820.                OpenDoors functions and their use is described in detail, listed
  1821.                in alphabetical order.
  1822.  
  1823.  
  1824. --------------------------------------------------------------------------------
  1825. OUTPUT         DISPLAY FUNCTIONS
  1826. FUNCTIONS      -----------------
  1827.                od_disp_str()            Displays a normal, NULL-terminated
  1828.                                         string. (page 46)
  1829.  
  1830.                od_disp()                Sends the specified number of characters
  1831.                                         to the modem, with or without local
  1832.                                         echo. (page 44)
  1833.  
  1834.                od_printf()              Performs formatted output, as the
  1835.                                         printf() function does. Also allows
  1836.                                         imbedded codes to change display colour.
  1837.                                         (page 93)
  1838.  
  1839.                od_putch()               Displays a single character. (page 97)
  1840.  
  1841.                od_emulate()             Displays a character, interpreting
  1842.                                         imbedded ANSI/AVATAR codes. (page 62)
  1843.  
  1844.  
  1845.  
  1846. OpenDoors Door Toolkit Manual - Version 4.10                       Page 30
  1847.  
  1848.  
  1849.  
  1850.                od_repeat()              Displays the same character any number
  1851.                                         of times, using AVATAR optimization, if
  1852.                                         possible. (page 99)
  1853.  
  1854.                od_draw_box()            Draws a window on the screen in
  1855.                                         ANSI/AVATAR graphics mode. (page 48)
  1856.  
  1857.                COLOUR FUNCTIONS
  1858.                ----------------
  1859.                od_set_colour()          Sets current colour to specified
  1860.                                         foreground and background settings.
  1861.                                         (page 108)
  1862.  
  1863.                od_set_attrib()          Sets current colour to specified IBM-PC
  1864.                                         display attribute. (page 105)
  1865.  
  1866.                SCREEN FUNCTIONS
  1867.                ----------------
  1868.                od_clr_scr()             Clears the screen, if user has screen
  1869.                                         clearing enabled. (page 42)
  1870.  
  1871.                od_clr_line()            Clears the remainder of current line.
  1872.                                         (page 40)
  1873.  
  1874.                od_set_cursor()          Sets the position of the cursor, if
  1875.                                         ANSI/AVATAR mode is enabled. (page 111)
  1876.  
  1877.                FILE DISPLAY FUNCTIONS
  1878.                ----------------------
  1879.                od_send_file()           Displays an ASCII/ANSI/AVATAR file (for
  1880.                                         instance, an .ANS file created by a
  1881.                                         program such as "TheDraw" (page 101)
  1882.  
  1883.                od_hotkey_menu()         Displays an ASCII/ANSI/AVATAR menu file,
  1884.                                         with hotkeys active. (page 71)
  1885.  
  1886.                od_list_files()          Lists the files available for download
  1887.                                         in an area, using a FILES.BBS file.
  1888.                                         (page 87)
  1889.  
  1890.  
  1891. --------------------------------------------------------------------------------
  1892. INPUT          od_get_answer()          Inputs a single key from the keyboard,
  1893. FUNCTIONS                               allowing only particular responses.
  1894.                                         (page 66)
  1895.  
  1896.                od_get_key()             Inputs a single key from the keyboard,
  1897.                                         optionally waitin if a key is not
  1898.                                         available. (page 67)
  1899.  
  1900.                od_input_str()           Inputs a string of specified length,
  1901.                                         from the keyboard. (page 83)
  1902.  
  1903.                od_edit_str()            Formatted string editing function,
  1904.                                         requiring ANSI/AVATAR graphics. (page
  1905.                                         51)
  1906.  
  1907.  
  1908. OpenDoors Door Toolkit Manual - Version 4.10                       Page 31
  1909.  
  1910.  
  1911.  
  1912.  
  1913.                od_clear_keybuffer()     Removes any waiting keys from the
  1914.                                         keyboard input queue. (page 38)
  1915.  
  1916.  
  1917. --------------------------------------------------------------------------------
  1918. DOOR           od_init()                Begins door operation by setting up
  1919. FUNCTIONS                               the OpenDoors control structure, setting
  1920.                                         up the local screen, initializing the
  1921.                                         FOSSIL driver (if applicable), and
  1922.                                         reading the door information file. (page
  1923.                                         73)
  1924.  
  1925.                od_exit()                Ends door operations, closing the FOSSIL
  1926.                                         driver, re-writing the door information
  1927.                                         file, and optionally returning control
  1928.                                         to the BBS. (page 64)
  1929.  
  1930.                od_kernal()              The central OpenDoors control function,
  1931.                                         which should be executed every few
  1932.                                         seconds. (page 85)
  1933.  
  1934.                od_set_statusline()      Temporarily alters the setting of the
  1935.                                         current OpenDoors status line. (page
  1936.                                         113)
  1937.  
  1938.                od_page()                Allows the user to page the sysop for
  1939.                                         chat. (page 92)
  1940.  
  1941.                od_spawn()               OpenDoors quick-spawn function. Executes
  1942.                                         an external program (eg. file
  1943.                                         compressor, external protocol, etc.) on
  1944.                                         a separate screen, restoring the
  1945.                                         OpenDoors screen afterwards. (page 115)
  1946.  
  1947.                od_spawnvpe()            OpenDoors full-featured spawn function.
  1948.                                         Executes an external program on a
  1949.                                         seperate screen, searching the path for
  1950.                                         tthe program, allowing you to specify an
  1951.                                         environment to pass to the child
  1952.                                         process, and returning the errorlevel
  1953.                                         returned by the chiold process. (page
  1954.                                         117)
  1955.  
  1956.                od_carrier()             Allows detection of carrier signal in
  1957.                                         programs that have disabled OpenDoors
  1958.                                         internal checking. (page 34)
  1959.  
  1960.  
  1961. --------------------------------------------------------------------------------
  1962. CONFIG         od_init_with_config()    Begins doors operations, parsing
  1963. FILE                                    information from a configuration file.
  1964. FUNCTIONS                               (page 76)
  1965.  
  1966.                od_colour_config()       Transfers a colour configuration line to
  1967.                                         a colour attribute value. (page 36)
  1968.  
  1969.  
  1970. OpenDoors Door Toolkit Manual - Version 4.10                       Page 32
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976. --------------------------------------------------------------------------------
  1977. LOGFILE        od_log_open()            Opens a log file and begins logging
  1978. FUNCTIONS                               activities. (page 89)
  1979.  
  1980.                od_log_write()           Creates a log file entry. (page 91)
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032. OpenDoors Door Toolkit Manual - Version 4.10                       Page 33
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040. OD_CARRIER()
  2041. --------------------------------------------------------------------------------
  2042.  
  2043. PURPOSE        To determine the status of the carrier detect signal, in programs
  2044.                where OpenDoors' internal carrier detection has been disabled.
  2045.  
  2046.  
  2047. FORMAT         int od_carrier(void);
  2048.  
  2049.  
  2050. RETURNS        TRUE if a carrier is present, or
  2051.                FALSE if no carrier is present, or in local mode.
  2052.  
  2053.  
  2054. DESCRIPTION    Usually, you will not have any use for the od_carrier() function,
  2055.                as OpenDoors automatically monitor's the carrier detect signal,
  2056.                and will correctly recover if the carrier detect signal is lost
  2057.                while the door is operating in remote mode. However, in some
  2058.                programs, you may wish to disable OpenDoors' internal carrier
  2059.                detection routines, using the od_control.od_disable variable. Two
  2060.                such cases in which you might want to do this, are a call-back
  2061.                verification door, which disconnects the user and attempts to
  2062.                call them back, or in a terminal program, which is in fact not a
  2063.                door at all (and as such you would not want to have OpenDoors
  2064.                exit when the carrier detect signal is lost). In cases like
  2065.                these, you will then be able to use the od_carrier() function in
  2066.                order to determine the state of the carrier detect signal.
  2067.  
  2068.                This function will return a Boolean value (for more information
  2069.                on Boolean values, see the Glossary which begins on page 192), of
  2070.                either TRUE or FALSE. If a carrier detect signal is present when
  2071.                the function is called, it will return TRUE, and if no carrier
  2072.                detect signal is detected, it will return FALSE. Since there is
  2073.                no remote connection, and thus no carrier when OpenDoors is
  2074.                operating in local mode, this function will always return a value
  2075.                of FALSE in local mode.
  2076.  
  2077.  
  2078. EXAMPLE        As an example of the use of this function, let us consider a call
  2079.                back verification door, which hangs up on the user, and then
  2080.                calls the user back at their entered phone number, in order to
  2081.                verify the correctness of that number. This program would
  2082.                probably contain a function that is responsible for disconnecting
  2083.                the user, waiting for the connection to be broken, and then
  2084.                phoning the user. At some point in this function, likely just
  2085.                prior to the point where the function hangs up on the user, you
  2086.                would disable OpenDoors' internal carrier detection, using the
  2087.                line:
  2088.  
  2089.                     od_control.od_disable |= DIS_CARRIERDETECT;
  2090.  
  2091.  
  2092.  
  2093.  
  2094. OpenDoors Door Toolkit Manual - Version 4.10                       Page 34
  2095.  
  2096.  
  2097.  
  2098.                You would then want to have a piece of code which would simply
  2099.                wait up to a given amount of time for the carrier signal to drop.
  2100.                If this occurs, you would continue to place the call, and if it
  2101.                does not occur, you would probably try your hangup procedure one
  2102.                or two more times. In this example, the function will simply
  2103.                return with a value of FALSE if the carrier signal does not drop,
  2104.                and will call the place_call() function if it does drop,
  2105.                returning the Boolean value returned by the place_call()
  2106.                function. Our piece of example code would be as follows:
  2107.  
  2108.                     char hangup(void)
  2109.                        {
  2110.                        register long timer;
  2111.  
  2112.                        ...                       /* Perform hangup */
  2113.  
  2114.                                              /* Wait up to 30secs (546 ticks) */
  2115.                        timer=(*(long far *)0x46cL)+546L;
  2116.                        while(timer>=*(long far *))
  2117.                           {       /* If carrier has been lost, dial the modem */
  2118.                           if(!od_carrier()) return(place_call());
  2119.                           }
  2120.                        return(FALSE);
  2121.                        }
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156. OpenDoors Door Toolkit Manual - Version 4.10                       Page 35
  2157.  
  2158.  
  2159.  
  2160. OD_COLOUR_CONFIG()
  2161. --------------------------------------------------------------------------------
  2162.  
  2163. PURPOSE        Parses a colour configuration line from the configuration file,
  2164.                generating a colour attribute value.
  2165.  
  2166.  
  2167. FORMAT         unsigned char od_colour_config(char *config_line);
  2168.  
  2169.  
  2170. RETURNS        Colour attribute value
  2171.  
  2172.  
  2173. DESCRIPTION    This function will be of use if you are using the configuration
  2174.                file system of OpenDoors, and wish to allow the sysop to specify
  2175.                text colours to be used in your door. While OpenDoors
  2176.                automatically recognizes colour configuration settings for things
  2177.                such as sysop chat mode and FILES.BBS listings, you may wish to
  2178.                add additional colour configuration options. In this case, you
  2179.                could call the od_colour_config() function from your custom line
  2180.                function. For more information on the custom line function, see
  2181.                the description of the od_init_with_config() function.
  2182.  
  2183.                To use this function, simply pass the configuration file line you
  2184.                wish to have parsed to the function in it's single parameter. The
  2185.                function will then return a colour attribute value in the same
  2186.                format that is used but the od_set_attrib() function. Colours are
  2187.                specified using a string of the format:
  2188.  
  2189.                     {Flashing} {Bright} [foregoround] on [background]
  2190.  
  2191.                Where "Flashing" is an optional keyword indicating that the text
  2192.                should be flashing. "Bright" is an optional keyword indicating
  2193.                that the foreground colour should be bright. Foreground is the
  2194.                name of a foreground colour, and background is the name of a
  2195.                background colour. Case (upper or lower) is not significant.
  2196.  
  2197.                The colour keywords are language configurable, using the global
  2198.                array od_config_colours. The default definition of this array is
  2199.                listed below. Note that all keywords must all be uppercase. The
  2200.                first eight elements in this array are the names of the eight
  2201.                basic colours, in order from 0 to 7. The next two options are
  2202.                alternative names for the colours 6 and 7. This is provided
  2203.                because these two colours look significantly different in low and
  2204.                high intensity, and will often be called by different names. The
  2205.                last to elements in this array are the "Bright" and "Flashing"
  2206.                keywords.
  2207.  
  2208.                char od_config_colours[12][33]={
  2209.                                          "BLACK",
  2210.                                          "BLUE",
  2211.                                          "GREEN",
  2212.                                          "CYAN",
  2213.                                          "RED",
  2214.                                          "MAGENTA",
  2215.                                          "YELLOW",
  2216.  
  2217.  
  2218. OpenDoors Door Toolkit Manual - Version 4.10                       Page 36
  2219.  
  2220.  
  2221.  
  2222.                                          "WHITE",
  2223.                                          "BROWN",
  2224.                                          "GREY",
  2225.                                          "BRIGHT",
  2226.                                          "FLASHING"};
  2227.  
  2228.  
  2229. SEE ALSO       od_init_with_config()
  2230.  
  2231.  
  2232. EXAMPLE        See the example accompanying the od_init_with_config() function
  2233.                documentation.
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280. OpenDoors Door Toolkit Manual - Version 4.10                       Page 37
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288. OD_CLEAR_KEYBUFFER()
  2289. --------------------------------------------------------------------------------
  2290.  
  2291. PURPOSE        Function to clear the input keyboard buffer
  2292.  
  2293.  
  2294. FORMAT         void od_clear_keybuffer(void);
  2295.  
  2296.  
  2297. RETURNS        N/A
  2298.  
  2299.  
  2300. DESCRIPTION    OpenDoors maintains its own keyboard input buffer, in order to
  2301.                permit the user to "type ahead" - to send input to the door prior
  2302.                to the time when it is ready to process those key presses. For
  2303.                example, the user could begin to type a command while a menu is
  2304.                still being displayed, and when your door reaches the point of
  2305.                inputting the menu command, the characters already typed by the
  2306.                user will already be waiting for the OpenDoors input functions.
  2307.                Note that the keyboard input buffer will include both the keys
  2308.                hit by the user on-line, and the non-function keys (ie, Alt-C
  2309.                will not appear in the OpenDoors keyboard buffer), hit by the
  2310.                sysop. This allows both the user on-line and the sysop to control
  2311.                the door at any time. If the sysop wishes to temporarily prevent
  2312.                the user from having any control over the door, the sysop may use
  2313.                the Alt-K (user-keyboard off) key. The key strokes placed in the
  2314.                OpenDoors type-ahead buffer will be retrieved by the od_get_key()
  2315.                and od_input_str() functions. The keyboard buffer can contain a
  2316.                maximum of 64 user keystrokes in this version of OpenDoors, after
  2317.                which any additional keystrokes will simply be discarded by
  2318.                OpenDoors.
  2319.  
  2320.                There are times, however, when you will want to erase any keys
  2321.                that have been hit by the user, to prevent them from typing
  2322.                ahead. For example, if your door has been busy doing some
  2323.                processing for a few moments, they user may have been pressing
  2324.                keys on their keyboard - perhaps in the hope that doing so will
  2325.                speed things up. These keys will be waiting in the type-ahead
  2326.                buffer, and if one of the keys the user entered was a valid
  2327.                response to the next prompt in your door, the user may find that
  2328.                they have accidentally made a choice they did not wish to. A well
  2329.                designed door will simply erase the contents of the type-ahead
  2330.                buffer after any long period of internal processing, etc. Keep in
  2331.                mind that too much use of the od_clear_keybuffer() function can
  2332.                be just as undesirable as not using it all, as there are times
  2333.                when the presence of the keyboard buffer can prove to be very
  2334.                useful for the user of a door.
  2335.  
  2336.                To erase the contents of the type-ahead buffer, you simply call
  2337.                the od_clear_keybuffer() function. This function takes no
  2338.                parameters, and does not return any value.
  2339.  
  2340.  
  2341.  
  2342. OpenDoors Door Toolkit Manual - Version 4.10                       Page 38
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348. SEE ALSO       od_get_key(), od_input_str(), od_edit_str()
  2349.  
  2350.  
  2351. EXAMPLE        For one example of the use of the od_clear_keybuffer() function,
  2352.                see the example door program EZVote, which is described beginning
  2353.                on page 25. Below is another example of using this function. In
  2354.                this case, we present a simple function, wait_for_return(), which
  2355.                simply pauses for the user to press their [Enter]/[Return] key.
  2356.                The function begins by displaying a prompt asking for the [Enter]
  2357.                or [Return] key to be pressed. The function then clears the
  2358.                keyboard input buffer, and waits until the user presses the
  2359.                carriage return key, using the od_get_key() function. Note also
  2360.                that this function will only continue if the user has pressed the
  2361.                correct key. This is a good idea in all door programs, as it
  2362.                allows your door to distinguish between a character pressed by
  2363.                the user, and a "line noise" character.
  2364.  
  2365.                     void wait_for_return(void)
  2366.                        {                                    /* Display prompt */
  2367.                        od_disp_str("Please Press [Enter] to continue...\n\r");
  2368.                        od_clear_keybuffer();         /* Clear keyboard buffer */
  2369.                        while(od_get_key(TRUE)!=13);     /* Wait for Enter key */
  2370.                        }
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404. OpenDoors Door Toolkit Manual - Version 4.10                       Page 39
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412. OD_CLR_LINE()
  2413. --------------------------------------------------------------------------------
  2414.  
  2415. PURPOSE        Clears the rest of the current display line
  2416.  
  2417.  
  2418. FORMAT         void od_clr_line(void);
  2419.  
  2420.  
  2421. RETURNS        N/A
  2422.  
  2423.  
  2424. DESCRIPTION    This function clears the line that the cursor is on, from the
  2425.                cursor position to the end of the line. After the rest of the
  2426.                line is cleared, the cursor is automatically returned to the
  2427.                position it was at prior to issuing the command. Hence, if the
  2428.                display line the cursor was located on looked as follows, with
  2429.                the underscore (_) character representing the cursor position:
  2430.  
  2431.                         This is a_line of text!
  2432.  
  2433.                With the cursor between the words "a" and "line", after the
  2434.                od_clr_line command is issued, the line would appear as follows:
  2435.  
  2436.                         This is a_
  2437.  
  2438.                With the cursor directly following the word "a". Note that this
  2439.                function places a space character at the cursor location, and
  2440.                every location up to the end of the line.
  2441.  
  2442.                When the door is running in plain ASCII mode, this command will
  2443.                simply clear the rest of the line by manually sending a series of
  2444.                space and backspace characters. When ANSI or AVATAR modes are
  2445.                active, the corresponding ANSI/AVATAR control sequence will be
  2446.                sent in order to accomplish the line clear. Since the graphics
  2447.                mode sequences are much shorter than the sequence that would be
  2448.                required to clear the line manually, the use of this function
  2449.                will cause your door's graphics to display much more quickly when
  2450.                ANSI or AVATAR modes are active. Also note that in ANSI or AVATAR
  2451.                graphics modes, the line will be cleared with the currently
  2452.                selected colour attribute. Thus, if you wanted to place a blue
  2453.                background on a particular line, you would use the
  2454.                od_set_colour() (or od_set_attrib()) function, then use the
  2455.                od_set_cursor() function to locate the cursor at the beginning of
  2456.                the desired line, followed by the od_clr_line() function. Just
  2457.                such a procedure is demonstrated in the example, below.
  2458.  
  2459.  
  2460. SEE ALSO       od_clr_scr(), od_set_cursor()
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466. OpenDoors Door Toolkit Manual - Version 4.10                       Page 40
  2467.  
  2468.  
  2469.  
  2470. EXAMPLE        Below, is an example of a function that clears an entire line
  2471.                with a specified colour. Since this function performs operations
  2472.                that require ANSI or AVATAR graphics mode, it should only be used
  2473.                in a case where these modes are known to be available. For
  2474.                example, this function would be useful in a full-screen editor or
  2475.                viewer, or when performing ANSI animations. The function accepts
  2476.                three parameters: the line to be cleared (where 1 is the first
  2477.                line, 2 the second, and so on), the foreground colour of this
  2478.                line, and the background colour of this line.
  2479.  
  2480.                This function differs from the od_clr_line() function itself in
  2481.                several important manners. First of all, this function clears the
  2482.                entire line, whereas the od_clr_line() function can be used to
  2483.                clear only the remaining characters of the line, after any
  2484.                particular location. Also, as mentioned before, this function
  2485.                selects a colour to clear the line to, and moves the cursor to
  2486.                the line which is to be cleared - neither of which is done by the
  2487.                od_clr_line() function.
  2488.  
  2489.  
  2490.                void clear_line(char line_number,char foreground,char background)
  2491.                   {
  2492.                   od_set_cursor(line_number,1);       /* move to correct line */
  2493.                   od_set_colour(foreground,background);         /* set colour */
  2494.                   od_clr_line();                         /* clear entire line */
  2495.                   }
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528. OpenDoors Door Toolkit Manual - Version 4.10                       Page 41
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536. OD_CLR_SCR()
  2537. -------------------------------------------------------------------------------
  2538.  
  2539. PURPOSE        The OpenDoors clear screen function
  2540.  
  2541.  
  2542. FORMAT         void od_clr_scr(void);
  2543.  
  2544.  
  2545. RETURNS        N/A
  2546.  
  2547.  
  2548. DESCRIPTION    The od_clr_scr() function can be used to clear the door screen.
  2549.                (ie, the user's screen and local screen with the exception of the
  2550.                status line are cleared.) Also, if your door is running under a
  2551.                system, such as RemoteAccess, Apex or QuickBBS, which produce an
  2552.                EXITINFO.BBS file, this function will detect the user's screen
  2553.                clearing setting, and only clear the screen if screen clearing is
  2554.                turned on. If an EXITINFO.BBS file is not available, this
  2555.                function will always clear the screen (as OpenDoors will not be
  2556.                able to determine whether or not the user has screen clearing
  2557.                enabled). If your door will be running under BBS systems that do
  2558.                not pass the user's screen clearing setting to the door, you may
  2559.                wish to determine yourself whether or not the user's system
  2560.                supports screen clearing codes, during the first time the user
  2561.                uses the door. You will then be able to store this setting in a
  2562.                data file. The example below demonstrates how to detect whether
  2563.                or not the user's system supports screen clearing.
  2564.  
  2565.                You should note that the ability for the user's terminal to
  2566.                support screen clearing codes is independent of the user's ANSI /
  2567.                AVATAR graphics mode settings. The od_clr_scr() function
  2568.                accomplishes screen clearing by sending an ASCII 12 character to
  2569.                the remote terminal, and thus ANSI or AVATAR graphics are not
  2570.                necessarily required in order to clear the screen.
  2571.  
  2572.                For more information on the user's screen clearing setting,
  2573.                please refer to the user_attrib variable in the OpenDoors Control
  2574.                Structure chapter of this manual. If you wish to force a screen
  2575.                clear, regardless of the user's screen clearing setting, simply
  2576.                use the function call:
  2577.  
  2578.                          od_emulate(12);
  2579.  
  2580.  
  2581. SEE ALSO       od_clr_line()
  2582.  
  2583.  
  2584. EXAMPLE        Below is an example of a function which determines whether or not
  2585.                the user's system supports screen clearing. This function will
  2586.                return a value of TRUE if screen clearing is supported, and will
  2587.                return a value of FALSE if screen clearing is not supported:
  2588.  
  2589.  
  2590. OpenDoors Door Toolkit Manual - Version 4.10                       Page 42
  2591.  
  2592.  
  2593.  
  2594.  
  2595.                int user_supports_screen_clearing(void)
  2596.                   {
  2597.                   char answer;
  2598.                                               /* display instructions to user */
  2599.                   od_disp_str("In order for this door to function\n\r");
  2600.                   od_disp_str("correctly, we must know whether or not\n\r");
  2601.                   od_disp_str("your system supports screen clearing.\n\r");
  2602.                   od_disp_str("In a moment, we will attempt to clear\n\r");
  2603.                   od_disp_str("your screen in order to test your system's\n\r");
  2604.                   od_disp_str("capabilities.\n\r\n\r");
  2605.  
  2606.                   od_disp_str("Please press [Enter]/[Return] when you are\n\r");
  2607.                   od_disp_str("Ready to perform this test.\n\r");
  2608.                   while(od_get_key(TRUE)!=13);       /* wait for [Return] key */
  2609.  
  2610.                   od_clr_scr();                    /* attempt to clear screen */
  2611.                                           /* ask user if their screen cleared */
  2612.                   od_disp_str("Did your screen just clear? (Y/N)\n\r");
  2613.                   for(;;)            /* loop until user chooses [Y]es or [N]o */
  2614.                      {
  2615.                      answer=od_get_key(TRUE);            /* Get user's answer */
  2616.                      if(answer=='y' || answer=='Y') return(TRUE);
  2617.                      if(answer=='n' || answer=='N') return(FALSE);
  2618.                      }
  2619.                   }
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652. OpenDoors Door Toolkit Manual - Version 4.10                       Page 43
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660. OD_DISP()
  2661. -------------------------------------------------------------------------------
  2662.  
  2663. PURPOSE        Sends a buffer of text with optional local echo
  2664.  
  2665.  
  2666. FORMAT         void od_disp(char *buffer, int size, char local_echo);
  2667.  
  2668.  
  2669. RETURNS        N/A
  2670.  
  2671.  
  2672. DESCRIPTION    This function allows you to send a buffer of text of any
  2673.                specified length, with the option of enabling or disabling local
  2674.                echo. You will probably have little use for this function -
  2675.                instead you will most likely display strings using either the
  2676.                od_disp_str() or od_printf() functions, depending on whether or
  2677.                not you wish to use printf()'s formatting options. For a
  2678.                breakdown of the uses of the various OpenDoors display functions,
  2679.                see the description of the od_disp_str() function, on page 46.
  2680.  
  2681.                There are two cases when this function will come in useful:
  2682.  
  2683.                     1.) If you wish to display a buffer of characters of known
  2684.                         length, which may contain null (ASCII 0) characters.
  2685.                         Since this character is used by the C language to
  2686.                         indicate the end of a string, the other two string
  2687.                         display functions (od_disp_str() and od_printf()) will
  2688.                         not send this character to the remote system.
  2689.  
  2690.                     2.) If you wish to send text to the remote system without
  2691.                         having it displayed on the local screen, or if you wish
  2692.                         to send strings to the modem when it is in command mode,
  2693.                         without having these characters displayed on the local
  2694.                         screen.
  2695.  
  2696.                The od_disp() function is called with three parameters. The first
  2697.                parameter, *buffer, is a pointer to a buffer of characters you
  2698.                wish to have displayed. The second parameter, size, is simply the
  2699.                number of characters in the buffer to be displayed. If the third
  2700.                parameter, local_echo, is set to TRUE, then all characters sent
  2701.                to the modem will also be displayed on the local screen. If the
  2702.                third parameter is set to FALSE, then the buffer will be sent to
  2703.                the modem without being echoed to the sysop's screen.
  2704.  
  2705.  
  2706. SEE ALSO       od_disp_str(), od_printf(), od_putch(), od_repeat(), od_emulate()
  2707.  
  2708.  
  2709. EXAMPLES       The following are a few examples of the use of the od_disp()
  2710.                function:
  2711.  
  2712.  
  2713.  
  2714. OpenDoors Door Toolkit Manual - Version 4.10                       Page 44
  2715.  
  2716.  
  2717.  
  2718.                In order to display a single character, contained in the variable
  2719.                "character", without echo to the local screen:
  2720.  
  2721.                     od_disp(&character,1,FALSE);
  2722.  
  2723.  
  2724.                In order to send a command to the modem (only if you know that
  2725.                the modem is in command mode), with the command contained in the
  2726.                null-terminated string "string":
  2727.  
  2728.                     od_disp(string,strlen(string),FALSE);
  2729.  
  2730.  
  2731.                In order to send exactly 5 characters from the buffer "buffer",
  2732.                WITH echo to the local screen:
  2733.  
  2734.                     od_disp(buffer,5,TRUE);
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776. OpenDoors Door Toolkit Manual - Version 4.10                       Page 45
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784. OD_DISP_STR()
  2785. --------------------------------------------------------------------------------
  2786.  
  2787. PURPOSE        Displays a string to the screen (remote and local)
  2788.  
  2789.  
  2790. FORMAT         void od_disp_str(char *string);
  2791.  
  2792.  
  2793. RETURNS        N/A
  2794.  
  2795.  
  2796. DESCRIPTION    The two functions most often used for displaying strings within a
  2797.                door are the od_disp_str() and od_printf() functions. The
  2798.                od_printf() function allows for formatted output, whereas the
  2799.                od_disp_str function simply displays the actual contents of the
  2800.                string passed to it. If you wish to display a single character,
  2801.                use the od_putch() function. If you wish to send a string or
  2802.                buffer to the modem without local echo, use the od_disp()
  2803.                function. If you wish to send a sequence of the same character to
  2804.                the modem, the od_repeat() function will use graphics control
  2805.                codes, if available to display the sequence much faster than
  2806.                simply sending the same character in repetition. Also, if you
  2807.                wish to send ANSI or AVATAR graphics control codes, and have them
  2808.                emulated on the local screen, use the od_emulate() function.
  2809.  
  2810.                The od_disp_str() function displays the contents of the null-
  2811.                terminated string pointed to by *string. Display is sent to both
  2812.                the local screen and modem (presuming the door is not running in
  2813.                local mode).
  2814.  
  2815.                All modem output is accomplished through the Fossil driver. Also,
  2816.                if the variable directvideo is set to 1, then the screen display
  2817.                is accomplished by direct writes, either to video memory, or to
  2818.                the DesqView screen buffer, if DesqView is running. If
  2819.                directvideo is set to 0, then BIOS function calls are used for
  2820.                video output. While using direct video writes results in much
  2821.                greater screen updates speeds, it will also cause difficulties
  2822.                for people running in multitaskers, such as DesqView. Ideally,
  2823.                you could design your door to either accept a command-line
  2824.                parameter or a setting in it's configuration file to allow the
  2825.                sysop using your door to select either direct or BIOS writes.
  2826.  
  2827.                An important thing to keep in mind when using the od_disp_str()
  2828.                function, is that you should use "/n/r" instead of simply "/n"
  2829.                for a new line. This is due to the fact that terminal programs
  2830.                usually require a carriage-return line-feed sequence (/n/r),
  2831.                instead of just a line-feed (/n). For example, instead of using:
  2832.  
  2833.                               od_disp_str("Hello world!\n");
  2834.  
  2835.                You should use:
  2836.  
  2837.  
  2838. OpenDoors Door Toolkit Manual - Version 4.10                       Page 46
  2839.  
  2840.  
  2841.  
  2842.  
  2843.                               od_disp_str("Hello world!\n\r");
  2844.  
  2845.                To change the cursor colour or location of output with the
  2846.                od_disp_str() function, refer to the od_set_cursor() and the
  2847.                od_set_attrib() functions.
  2848.  
  2849.  
  2850. SEE ALSO       od_disp(), od_printf(), od_putch(), od_repeat(), od_emulate()
  2851.  
  2852.  
  2853. EXAMPLES       Below are a few examples of various uses of the od_disp_str()
  2854.                function:
  2855.  
  2856.                Displaying three string constants on separate lines:
  2857.  
  2858.                          od_disp_str("This is an example\n\r");
  2859.                          od_disp_str("of the OpenDoors\n\r");
  2860.                          od_disp_str("od_disp_str() function\n\r");
  2861.  
  2862.  
  2863.                Displaying three string constants on the same line:
  2864.  
  2865.                          od_disp_str("Another ");
  2866.                          od_disp_str("od_disp_str() ");
  2867.                          od_disp_str("example\n\r");
  2868.  
  2869.  
  2870.                Displaying a string variable:
  2871.  
  2872.                          char string[80];
  2873.  
  2874.                          strcpy(string,"This is a string!\n\r");
  2875.                          od_disp_str(string);
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900. OpenDoors Door Toolkit Manual - Version 4.10                       Page 47
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908. OD_DRAW_BOX()
  2909. --------------------------------------------------------------------------------
  2910.  
  2911. PURPOSE        Draws a window on the screen in ANSI or AVATAR graphics modes.
  2912.  
  2913.  
  2914. FORMAT         int od_draw_box(char left, char top, char right, char bottom);
  2915.  
  2916.  
  2917. RETURNS        TRUE on success, FALSE on failure
  2918.  
  2919.  
  2920. DESCRIPTION    This function is for use in ANSI or AVATAR graphics modes. This
  2921.                function will draw a window in the current display attribute, at
  2922.                the specified location on the screen. The boarder of the window
  2923.                is made up of the characters specified in the od_control.
  2924.                od_box_chars[] array. If AVATAR graphics mode is available, this
  2925.                function uses AVATAR control codes to display the window in less
  2926.                than 1/10 the length of time required to display the window in
  2927.                ANSI mode.
  2928.  
  2929.                The first two parameters of this function, "left" and "top",
  2930.                specify the coordinates of the top, left-hand corner of the
  2931.                window to be draw. The third and fourth parameters, "right" and
  2932.                "bottom", specify the coordinates of the bottom, left-hand corner
  2933.                of the window. Like the values passed to the od_set_cursor()
  2934.                function, these coordinates are relative to the upper left-hand
  2935.                corner of the screen, with the position (1,1) being this corner.
  2936.  
  2937.                As mentioned above, this function will display the window in the
  2938.                current text colour. Thus, before calling this function, you
  2939.                should use either the od_set_colour() or the od_set_attrib()
  2940.                function to specify the colour in which you would like to have
  2941.                the window displayed.
  2942.  
  2943.                Normally, the boarder of the window will be displayed using the
  2944.                IBM extended ASCII characters which produce a single line
  2945.                boarder. However, you may wish to have the boarder displayed
  2946.                using different characters. In this case, the characters used to
  2947.                display the boarder can be specified by the od_control.
  2948.                od_box_chars variable, described in the OpenDoors control
  2949.                structure section of this manual.
  2950.  
  2951. SEE ALSO       od_set_colour(), od_set_attrib(), od_clr_scr(), od_edit_str(),
  2952.                od_set_cursor()
  2953.  
  2954.  
  2955. EXAMPLE        As an example of the use of the od_draw_box() function in
  2956.                conjunction with the od_edit_str() function, we show a portion of
  2957.                a program which displays a window, and allows the user to input
  2958.                the name of a file they would like to upload, a description of
  2959.                the file, and whether they want it to be a private upload. The
  2960.  
  2961.  
  2962. OpenDoors Door Toolkit Manual - Version 4.10                       Page 48
  2963.  
  2964.  
  2965.  
  2966.                user is able to move among fields using the tab key, and select a
  2967.                "continue" button when they are finished. The function returns
  2968.                TRUE if the user selects continue, and FALSE if the user presses
  2969.                [ESCape].
  2970.  
  2971.                                                    // Main "dialog box" function
  2972.                int get_information(char *filename, char *description,
  2973.                                     char *private)
  2974.                   {
  2975.                   char current_field=1;              // Currently selected field
  2976.                   int choice;                                   // User's choice
  2977.  
  2978.                   od_set_colour(L_WHITE,D_BLUE);               // Display window
  2979.                   od_draw_box(10,5,70,13);
  2980.  
  2981.                   od_set_cursor(5,25);                   // Display window title
  2982.                   od_set_colour(L_GREEN,D_BLUE);
  2983.                   od_disp_str(" ENTER FILENAME INFORMATION ");
  2984.  
  2985.                   od_set_colour(L_CYAN,D_BLUE);     // Display fields and titles
  2986.                   od_set_cursor(6,15);
  2987.                   od_disp_str("FILENAME : ");
  2988.                   od_repeat(176,13);
  2989.                   od_set_cursor(7,12);
  2990.                   od_disp_str("DESCRIPTION : ");
  2991.                   od_repeat(176,43);
  2992.                   od_set_cursor(8,16);
  2993.                   od_disp_str("PRIVATE : ");
  2994.                   od_repeat(176,2);
  2995.                   draw_button();
  2996.  
  2997.                   filename[0]='\0';     // Blank out contents of input variables
  2998.                   description[0]='\0';
  2999.                   private[0]='\0';
  3000.  
  3001.                   for(;;)                                // Main dialog box loop
  3002.                      {
  3003.                      if(current_field==4)              // If field is the button
  3004.                         {
  3005.                         od_set_colour(L_GREEN,D_BLUE);       // Highlight button
  3006.                         draw_button();
  3007.  
  3008.                         do   // Loop until user presses [TAB], [ENTER], or [ESC]
  3009.                            {
  3010.                            choice=od_get_key(TRUE);
  3011.                            } while(choice!=9 && choice!=13 && choice!=27);
  3012.  
  3013.                         od_set_colour(L_CYAN,D_BLUE);     // Un-highlight button
  3014.                         draw_button();
  3015.  
  3016.                         if(choice==13) return(TRUE);   // If [ENTER] was pressed
  3017.                         if(choice==27) return(FALSE);    // If [ESC] was pressed
  3018.                         current_field=1;         // Otherwise, [TAB] was pressed
  3019.                         }
  3020.  
  3021.                     switch(current_field)        // According to selected field
  3022.  
  3023.  
  3024. OpenDoors Door Toolkit Manual - Version 4.10                       Page 49
  3025.  
  3026.  
  3027.  
  3028.                         {                     // Input from the appropriate line
  3029.                         case 1:
  3030.                            choice=od_edit_str(filename,"FFFFFFFFFFFF",6,26,
  3031.                                               0x1b,0x1a,176,
  3032.                                               EDIT_FLAG_EDIT_STRING|
  3033.                                               EDIT_FLAG_ALLOW_CANCEL|
  3034.                                               EDIT_FLAG_FIELD_MODE|
  3035.                                               EDIT_FLAG_KEEP_BLANK);
  3036.                            break;
  3037.                         case 2:
  3038.                            choice=od_edit_str(description,"*******************",
  3039.                                               7,26,0x1b,0x1a,176,
  3040.                                               EDIT_FLAG_EDIT_STRING|
  3041.                                               EDIT_FLAG_ALLOW_CANCEL|
  3042.                                               EDIT_FLAG_FIELD_MODE|
  3043.                                               EDIT_FLAG_KEEP_BLANK);
  3044.  
  3045.                            break;
  3046.                         case 3:
  3047.                            choice=od_edit_str(private,"Y",8,26,
  3048.                                               0x1b,0x1a,176,
  3049.                                               EDIT_FLAG_EDIT_STRING|
  3050.                                               EDIT_FLAG_ALLOW_CANCEL|
  3051.                                               EDIT_FLAG_FIELD_MODE);
  3052.                         }
  3053.                                                      // If user pressed [ESCape]
  3054.                      if(choice==EDIT_RETURN_CANCEL) return(FALSE);
  3055.                                        // If user choice to go to previous field
  3056.                      if(choice==EDIT_RETURN_PREVIOUS)
  3057.                         {
  3058.                         if(current_field==1)                // If at first field
  3059.                            {
  3060.                            current_field=4;                  // Go to last field
  3061.                            }
  3062.                         else                            // If not at first field
  3063.                            {
  3064.                            --current_field;              // Go to previous field
  3065.                            }
  3066.                         }
  3067.                      else                            // If user chose next field
  3068.                         {
  3069.                         ++current_field;                     // Go to next field
  3070.                         }
  3071.                      }
  3072.                   }
  3073.  
  3074.                void draw_button(void)          // Function to display the button
  3075.                   {
  3076.                   od_draw_box(12,10,23,12);               // Draw box for button
  3077.                   od_set_cursor(11,14);
  3078.                   od_disp_str("Continue");             // Display text in button
  3079.                   }
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086. OpenDoors Door Toolkit Manual - Version 4.10                       Page 50
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094. OD_EDIT_STR()
  3095. --------------------------------------------------------------------------------
  3096.  
  3097. PURPOSE        Allows you to perform formatted input with full line editing
  3098.                features, etc., in ANSI / AVATAR graphics mode.
  3099.  
  3100.  
  3101. FORMAT         unsigned int od_edit_str(char *input_string, char *format_string,
  3102.                int row, int col, unsigned char normal_colour, unsigned char
  3103.                highlight_colour, char character, unsigned int flags);
  3104.  
  3105.  
  3106. RETURNS        This function will return one of the following values. Note that
  3107.                some of these values will only be applicable in certain cases.
  3108.                For example, EDIT_RETURN_CANCEL will never be returned if you
  3109.                have not enabled the cancel feature of this function.
  3110.  
  3111.                EDIT_RETURN_ERROR        Indicates that an error has occurred,
  3112.                                         and the edit function was unable to run.
  3113.                                         This will occur if there is an error in
  3114.                                         one of the parameters, or if ANSI /
  3115.                                         AVATAR graphics is not available
  3116.  
  3117.                EDIT_RETURN_CANCEL       Indicates that the user pressed the
  3118.                                         cancel key [ESC], and that the string
  3119.                                         was left unaltered.
  3120.  
  3121.                EDIT_RETURN_ACCEPT       Indicates that the user pressed the
  3122.                                         accept key [Enter], or that the auto-
  3123.                                         enter feature was activated.
  3124.  
  3125.                EDIT_RETURN_PREVIOUS     Indicates that the user wishes to move
  3126.                                         to the previous field, by pressing [UP
  3127.                                         ARROW], [SHIFT]-[TAB], etc.
  3128.  
  3129.                EDIT_RETURN_NEXT         Indicates that the user wishes to move
  3130.                                         to the next field, by pressing [DOWN
  3131.                                         ARROW], [TAB], etc.
  3132.  
  3133.  
  3134. DESCRIPTION    To perform string input within OpenDoors, one of two functions
  3135.                can be used, od_input_str() and od_edit_str(). The first
  3136.                function, od_input_str(), allows simple line input and editing,
  3137.                and can be used in ASCII, ANSI and AVATAR modes. The second
  3138.                function, od_edit_str(), allows many formatted input options,
  3139.                advanced line editing, and other features, but requires the use
  3140.                of ANSI or AVATAR graphics modes.
  3141.  
  3142.                The od_edit_str() function provides a great deal of features and
  3143.                functionality, and as such, may appear to be one of the most
  3144.                complicated functions within the OpenDoors door driver. The
  3145.                simple fact that the function accepts eight parameters may make
  3146.  
  3147.  
  3148. OpenDoors Door Toolkit Manual - Version 4.10                       Page 51
  3149.  
  3150.  
  3151.  
  3152.                the od_edit_str() function seem daunting. However, you need not
  3153.                concern yourself with all of the features available from the
  3154.                od_edit_str() function in order to make use of it. Reading
  3155.                through this section should give you some idea of what is
  3156.                possible with the od_edit_str() function, and the following
  3157.                examples should help to demonstrate the use of this function.
  3158.  
  3159.                The first thing to remember about the od_edit_str() function is
  3160.                that it requires ANSI / AVATAR graphics, as the graphics control
  3161.                codes are needed for the advanced editing capabilities provided
  3162.                by the od_edit_str() function. Thus, you will only want to use
  3163.                the od_edit_str() in one of two cases; either in a door which
  3164.                requires ANSI / AVATAR graphics to operate, or in the case that
  3165.                you program tests for the availability of ANSI / AVATAR graphics,
  3166.                and only calls od_edit_str() if graphics is available. If ANSI /
  3167.                AVATAR graphics is not available, your program should use the
  3168.                od_input_str() function instead.
  3169.  
  3170.                As mentioned above, the od_edit_str() function allows for
  3171.                advanced line editing, such as inputting and deleting text from
  3172.                the middle of the string (whereas the od_input_str() function
  3173.                only allows editing from the end of the string, such as
  3174.                backspacing to erase a mistake). The edit functions available
  3175.                from the od_edit_str() are listed below. Note that some of these
  3176.                functions may or may not be available, depending upon the
  3177.                capabilities of the user's terminal program. While there is no
  3178.                single standard used for the transmission of special edit keys
  3179.                such as the arrow keys, the od_edit_str() function makes as much
  3180.                effort as possible to make all of the edit features available to
  3181.                most terminal programs. Many of the edit functions can be
  3182.                accesses using either [CONTROL]-key combinations or special keys
  3183.                such as the arrow keys, delete key, and so on. OpenDoors will
  3184.                recognize most of these special control keys when sent as either
  3185.                an ANSI control sequence (which is sent by most terminal
  3186.                programs), or as a DoorWay style scan code / ASCII code sequence
  3187.                (which is also available from many terminal programs, but is not
  3188.                usually required). The od_edit_str() edit functions are as
  3189.                follows. Note that all edit functions are always available from
  3190.                the local keyboard.
  3191.  
  3192.                HOME - Moves the cursor to the beginning of the line being
  3193.                          edited. Press the [HOME] key, either in DoorWay mode or
  3194.                          from the local keyboard.
  3195.  
  3196.                END - Moves the cursor to the end of the line being edited. Press
  3197.                          the [END] key, either in DoorWay mode or from the local
  3198.                          keyboard.
  3199.  
  3200.                DELETE CHARACTER - Deletes the character under the cursor. Press
  3201.                          [DELete] on the local keyboard, in DoorWay mode, and
  3202.                          under many terminal programs without DoorWay mode.
  3203.                          Alternatively, press [CONTROL]-[G].
  3204.  
  3205.                BACKSPACE - Deletes the character left of the cursor. Press
  3206.                          [BACKSPACE] or [CONTROL]-[H].
  3207.  
  3208.  
  3209.  
  3210. OpenDoors Door Toolkit Manual - Version 4.10                       Page 52
  3211.  
  3212.  
  3213.  
  3214.                TOGGLE INSERT MODE - Switches the od_edit_str() function between
  3215.                          insert mode and overwrite mode. Press [INSert], either
  3216.                          in DoorWay mode, or from the local keyboard.
  3217.                          Alternatively, press [CONTROL]-[V].
  3218.  
  3219.                CURSOR LEFT - Moves the cursor left one character. Press [LEFT
  3220.                          ARROW] on the local keyboard, in DoorWay mode, and
  3221.                          under many terminal programs without DoorWay mode.
  3222.                          Alternatively, press [CONTROL]-[S].
  3223.  
  3224.                CURSOR RIGHT - Moves the cursor right one character. Press [RIGHT
  3225.                          ARROW] on the local keyboard, in DoorWay mode, and
  3226.                          under many terminal programs without DoorWay mode.
  3227.                          Alternatively, press [CONTROL]-[D].
  3228.  
  3229.                ERASE ENTIRE LINE - Press [CONTROL]-[Y].
  3230.  
  3231.                ACCEPT INPUT - Press the [ENTER] / [RETURN] line to accept the
  3232.                          input. Alternatively, press [CONTROL]-[Z]. Note that
  3233.                          this key will only work when the current input is
  3234.                          "valid" (ie, it conforms to the format string, which is
  3235.                          described below)
  3236.  
  3237.                CANCEL INPUT - Only available if specifically enabled on the
  3238.                          od_edit_str() command line. Press [ESCape].
  3239.  
  3240.                NEXT FIELD - If enabled, allows the user to move to the next
  3241.                          field in a dialog box / form. Press [DOWN ARROW] in
  3242.                          DoorWay mode and under many terminal programs without
  3243.                          DoorWay mode. Alternatively, press [TAB]. Note that the
  3244.                          [DOWN ARROW] key is NOT usually available from the
  3245.                          local keyboard, as it is usually used to adjust the
  3246.                          user's remaining time.
  3247.  
  3248.                PREVIOUS FIELD - If enabled, allows the user to move to the
  3249.                          previous field in a dialog box / form. Press [UP ARROW]
  3250.                          in DoorWay mode and under many terminal programs
  3251.                          without DoorWay mode. Alternatively, press [SHIFT]-
  3252.                          [TAB] on the local keyboard or in DoorWay mode. Again,
  3253.                          note that the [UP ARROW] key is NOT usually available
  3254.                          from the local keyboard, as it is usually used to
  3255.                          adjust the user's remaining time.
  3256.  
  3257.  
  3258.                Let us now look at the parameters which the od_edit_str()
  3259.                function accepts. The first parameter, input_string, is a pointer
  3260.                to the string where the user's input should be stored. It is
  3261.                important that this string be long enough to accommodate the
  3262.                longest input your format string will permit, including the '\0'
  3263.                C string terminator (ie, the string should be one character
  3264.                greater than the length of the format string, not including the
  3265.                format string's ' and " characters).
  3266.  
  3267.                The second parameter, format_string, is a pointer to a string
  3268.                which specifies the format and maximum length of the input the
  3269.                od_edit_str() function should accept. Using the format string,
  3270.  
  3271.  
  3272. OpenDoors Door Toolkit Manual - Version 4.10                       Page 53
  3273.  
  3274.  
  3275.  
  3276.                not only do you specify the length of the input field, but you
  3277.                can also force the user's input into certain formats. For
  3278.                example, if you wished to input a North American style phone
  3279.                number, you could use a format string of "###-###-####". Then
  3280.                regardless of whether the user typed any dash character or not,
  3281.                their input would be converted, as they type, to the format of
  3282.                the phone number 613-526-4466. You could also specify a format
  3283.                string such of "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM", which would
  3284.                permit the user to enter a name of up to 30 characters. The
  3285.                od_edit_str() function would then automatically capitalize the
  3286.                name, so that the first character of each word is capitalized,
  3287.                and the remain characters of the word is in lower case. Even if
  3288.                the user were to move the cursor to the middle of the string they
  3289.                had entered, and add or delete a space (and thus either make one
  3290.                work two or two words one), od_edit_str() would re-format the
  3291.                string to reflect the change. The valid characters for the format
  3292.                sting, along with their meanings, are listed below. Note that the
  3293.                format string is NOT case sensitive (except for literal strings
  3294.                delimited by the '' or "" characters), and space characters can
  3295.                be added at any point to increase legibility.
  3296.  
  3297.                (Note that this string format is a modified version of a format
  3298.                suggested in the OPENDOORS EchoMail conference, and it is
  3299.                understood that a similar format is used by at least one other C
  3300.                programming library. In using a similar format, it is not my
  3301.                intention to copy someone else's idea, but simply to build upon a
  3302.                format that it seems is familiar to some C programmers already.)
  3303.  
  3304.                #    Indicates that numeric characters from '0' to '9' are valid
  3305.                     for this position
  3306.  
  3307.                %    Indicates that numeric characters from '0' to '9', and the
  3308.                     space character (' ') are valid for this position.
  3309.  
  3310.                9    Indicates that numeric characters from '0' to '9', along
  3311.                     with '.', '-' and '+' are valid for this position. This
  3312.                     format style is intended for floating-point numeric input.
  3313.  
  3314.                ?    Indicates that any character is valid for this position.
  3315.  
  3316.                *    Indicates that any printable character, from ASCII 32 to
  3317.                     ASCII 127, is valid for this position.
  3318.  
  3319.                A    Indicates that alphabetical characters 'A' to 'Z', 'a' to
  3320.                     'z' and space (' ') are valid for this position.
  3321.  
  3322.                C    Indicates that city name characters are valid for this
  3323.                     position. As with the 'M' format character, words are
  3324.                     automatically capitalized so that the first letter is in
  3325.                     upper case, and all subsequent letters are in lower case. In
  3326.                     addition to permitting alphabetical characters and the space
  3327.                     (' ') character, the ',' and '.' characters are also
  3328.                     accepted in this position.
  3329.  
  3330.                D    Indicates that date characters '0' to '9', '-' and '/' are
  3331.                     valid for this position.
  3332.  
  3333.  
  3334. OpenDoors Door Toolkit Manual - Version 4.10                       Page 54
  3335.  
  3336.  
  3337.  
  3338.  
  3339.                F    Indicates that MS-DOS filename characters are valid for this
  3340.                     position.
  3341.  
  3342.                H    Indicates that hexidecimal character '0' to '9', 'A' to 'F'
  3343.                     and 'a' to 'f' are valid for this position.
  3344.  
  3345.                L    Indicates that only lower case alphabetical characters 'a'
  3346.                     to 'z', and the space (' ') character is valid for this
  3347.                     position. However, if the user attempts to enter an upper
  3348.                     case alphabetical character in this position, it will
  3349.                     automatically be converted to the lower case equivalent.
  3350.  
  3351.                M    Indicates that name characters are valid for this position.
  3352.                     These characters are the alphabetical characters 'A' to 'Z',
  3353.                     'a' to 'z', and the space character (' '). A character's
  3354.                     case is converted such that the first character of a word is
  3355.                     in upper case, and all other letters are in lower case.
  3356.  
  3357.                T    Indicates that telephone number character '0' to '9', '(',
  3358.                     ')', '-' and ' ' are valid for this position.
  3359.  
  3360.                U    Indicates that only upper case alphabetical characters 'A'
  3361.                     to 'Z', and the space (' ') character is valid for this
  3362.                     position. However, if the user attempts to enter a lower
  3363.                     case alphabetical character in this position, it will
  3364.                     automatically be converted to the upper case equivalent.
  3365.  
  3366.                W    Indicates that MS-DOS filename characters are permitted in
  3367.                     this position, including the '*' and '?' wildcard
  3368.                     characters.
  3369.  
  3370.                X    Indicates that alphanumeric characters 'A' to 'Z', 'a' to
  3371.                     'z', '0' to '9' and ' ' are valid for this position.
  3372.  
  3373.                Y    Indicates that yes/no characters 'Y', 'N', 'y', 'n' are
  3374.                     valid for this position. The characters are automatically
  3375.                     converted to upper case.
  3376.  
  3377.                '/"  Single or double quotes can be used to specify sequences of
  3378.                     characters that should appear at the same location in the
  3379.                     input string (referred to elsewhere as "literal strings").
  3380.                     When the user is entering the string, these characters are
  3381.                     automatically supplied, and the user is not required to type
  3382.                     them. Literal strings must begin and end with the same quote
  3383.                     character. Remember that the double quote (") character must
  3384.                     be imbedded in C strings by preceding the quote character
  3385.                     with a \ (backslash) character.
  3386.  
  3387.                The third and fourth parameters, row and col specify the location
  3388.                on the screen where the first (left most) character of the input
  3389.                field should be located. These parameters are identical to the
  3390.                row and col parameters passed to the od_set_cursor() function. In
  3391.                other words, row specifies the line number on the screen, where 1
  3392.                is the first line, and col specifies the column across the
  3393.                screen, where 1 is the first column.
  3394.  
  3395.  
  3396. OpenDoors Door Toolkit Manual - Version 4.10                       Page 55
  3397.  
  3398.  
  3399.  
  3400.  
  3401.                The fifth and sixth parameters, normal_colour and
  3402.                highlight_colour, allow you to specify the colour of the input
  3403.                field. The fifth parameter, normal_colour, specifies the colour
  3404.                of the input field when input is not taking place and the sixth
  3405.                parameter, highlight_colour, specifies the colour of the field
  3406.                while input is taking place. Thus, if you had several input
  3407.                fields on the screen at one time, you would be able to make is
  3408.                easier for the user to identify the currently active field by
  3409.                having the field currently accepting input highlighted in a
  3410.                colour distinct from the other fields. When the od_edit_str()
  3411.                function begins, it will change the current colour of the field
  3412.                from the normal colour to the highlighted colour. Then, when the
  3413.                od_edit_str() function exits, it will change the current colour
  3414.                of the field back to its normal colour. If you do not wish to
  3415.                have the field highlighted, you can set both of these parameters
  3416.                to the same value, and disable field re-drawing by using the
  3417.                eighth parameter, flags.
  3418.  
  3419.                The seventh parameter accepted by the od_edit_str() function,
  3420.                character, will serve one of two purposes. Normally, this
  3421.                parameter will specify a background character to display in the
  3422.                unfilled portion at the end of the input field. This can be set
  3423.                to a character, such as the ASCII 177 grey block character, to
  3424.                produce a visual background to the field. Doing this will show
  3425.                the user visually how long the field is, and how many character
  3426.                they will be permitted to type into the field. Normally, this
  3427.                field will be displayed during input, and removed when the
  3428.                od_edit_str() function exits. However, you may cause the
  3429.                background to remain in place using the eighth parameter, flags.
  3430.                If you do not wish to have this "background" visual field effect,
  3431.                simply set the character parameter to a space (ASCII 32). In
  3432.                password input mode, this parameter will instead specify the
  3433.                character to display in place of characters typed by the user. In
  3434.                this case, the background display character defaults to the space
  3435.                (ASCII 32) character.
  3436.  
  3437.                The eighth, and last, parameter accepted by the od_edit_str()
  3438.                function is the flags parameter. This parameter is a bit-mapped
  3439.                flags variable which allows you to control special features of
  3440.                the od_edit_str() function. More than one of these settings may
  3441.                be specified by listing a chain of the values, separated by the
  3442.                bitwise-or (|) operator. If you do not wish to turn on any of
  3443.                these modes, simply pass the EDIT_FLAG_NORMAL value as the flags
  3444.                parameter.
  3445.  
  3446.                EDIT_FLAG_NORMAL - Default setting, use this value of none of the
  3447.                          other flags below are active.
  3448.  
  3449.                EDIT_FLAG_NO_REDRAW - When set, prevents the od_edit_str()
  3450.                          function from re-drawing the input string and field
  3451.                          when it starts up and exits. If you set this flag, the
  3452.                          normal_colour and highlight colour should contain the
  3453.                          same value. If background character (the character
  3454.                          parameter) is not a space (ASCII 32) character, you
  3455.                          must draw the field background prior to calling
  3456.  
  3457.  
  3458. OpenDoors Door Toolkit Manual - Version 4.10                       Page 56
  3459.  
  3460.  
  3461.  
  3462.                          od_edit_str(). Also, if you are calling od_edit_str()
  3463.                          with the EDIT_FLAG_EDIT_STRING flag set, you must
  3464.                          display the existing string in the field prior to
  3465.                          calling od_edit_str().
  3466.  
  3467.                EDIT_FLAG_FIELD_MODE - Setting this flag specifies that
  3468.                          od_edit_str() should operate in field input mode. In
  3469.                          field input mode, the user may finish entering their
  3470.                          input by pressing the previous field or next field
  3471.                          button (arrow keys, tab keys, etc.), as described
  3472.                          above. If the user chooses to finish and accept their
  3473.                          input by pressing one of these keys, the od_edit_str()
  3474.                          return value will reflect which choice they made. This
  3475.                          will allow you to make it possible for the user to move
  3476.                          between a number of input fields in a form / dialog
  3477.                          box, as demonstrated in the example accompanying the
  3478.                          od_draw_box() function.
  3479.  
  3480.                EDIT_FLAG_EDIT_STRING - Setting this flag specifies that
  3481.                          od_edit_str() should edit a pre-existing string,
  3482.                          instead of starting with a blank string. In this case,
  3483.                          the input_string parameter MUST point to an initialized
  3484.                          string. This string may either contain some text, or be
  3485.                          empty, but od_edit_str() will expect to find a string
  3486.                          terminator ('\0') character, and will begin editing the
  3487.                          contents of the string prior to that character. If you
  3488.                          do not set the EDIT_FLAG_EDIT_STRING flag, the previous
  3489.                          contents of the input_string parameter is not
  3490.                          significant, as od_edit_str() will automatically start
  3491.                          with a blank string.
  3492.  
  3493.                EDIT_FLAG_STRICT_INPUT - Setting this flag causes the
  3494.                          od_edit_str() function to operate in "strict" input
  3495.                          mode, which may be desirable if your input format
  3496.                          contains more than one type of input. Normally, if you
  3497.                          were inputting such a string, the user would be able to
  3498.                          move to the middle of the string, and insert any text.
  3499.                          Doing so would cause the rest of the input line to
  3500.                          shift right. However, in cases where your format string
  3501.                          specifies different types of character to be permitted
  3502.                          in different positions, this can cause the input to be
  3503.                          changed so that it no longer conforms to the format
  3504.                          string. In this case, the user's input will no longer
  3505.                          be valid, and the user will not be able to exit the
  3506.                          function by pressing [ENTER] (although [ESCAPE] will
  3507.                          still be available, if you activated it) until they
  3508.                          change their input. However, when strict input mode is
  3509.                          turned on, od_edit_str() will restrict the ways in
  3510.                          which the user is permitted to edit the string, to
  3511.                          prevent just such a case from occurring.
  3512.  
  3513.                EDIT_FLAG_PASSWORD_MODE - Setting this flag causes the
  3514.                          od_edit_str() function to operate in "password" mode.
  3515.                          In password mode, the characters typed by the user will
  3516.                          be hidden, displayed instead as the blank character
  3517.                          specified in the "character" parameter.
  3518.  
  3519.  
  3520. OpenDoors Door Toolkit Manual - Version 4.10                       Page 57
  3521.  
  3522.  
  3523.  
  3524.  
  3525.                EDIT_FLAG_ALLOW_CANCEL - When this flag is set, the user will be
  3526.                          able to cancel their current input and abort the
  3527.                          editing process by pressing their [ESCAPE] key. When
  3528.                          they do so, any changes they have made to the input
  3529.                          field will be cancelled, and replaced by the original
  3530.                          contents of the string. The od_edit_str() function will
  3531.                          then exit, indicating that the user has cancelled their
  3532.                          input.
  3533.  
  3534.                EDIT_FLAG_FILL_STRING - When set, this flag will force the user
  3535.                          to enter a string that fills the entire length of the
  3536.                          format string. Normally, the user will be able to enter
  3537.                          a string of any length up to the maximum length
  3538.                          specified by the format string. However in some cases,
  3539.                          such as when inputting a date, you will want to have
  3540.                          the input field filled. (Otherwise, the user would be
  3541.                          able to enter only the first part of the date.)
  3542.  
  3543.                EDIT_FLAG_AUTO_ENTER - When set, this flag will cause the
  3544.                          od_edit_str() function to automatically simulate
  3545.                          pressing of the [ENTER] key when the string is filled.
  3546.                          This can be used to cause the od_edit_str() function to
  3547.                          finish inputting as soon as a valid string is entered,
  3548.                          instead of having to wait for the user to press [ENTER]
  3549.                          / [RETURN].
  3550.  
  3551.                EDIT_FLAG_AUTO_DELETE - When set, along with the
  3552.                          EDIT_FLAG_EDIT_STRING flag, this flag will activate the
  3553.                          auto-delete feature of the od_edit_str() function. When
  3554.                          auto-delete is active, if the first key pressed by the
  3555.                          user is not an edit control key, the existing text will
  3556.                          automatically be deleted, and a totally new string
  3557.                          accepted from the user. This could be useful when you
  3558.                          are allowing the user to go back to edit a previous
  3559.                          input. If the user wishes to only change part of the
  3560.                          old string, they can move the cursor to the location
  3561.                          where they wish to make the change, and perform their
  3562.                          editing. However, if the user wishes to completely
  3563.                          replace the old string with a new one, they can simply
  3564.                          begin to type, and the old string will automatically be
  3565.                          deleted, and the new string accepted.
  3566.  
  3567.                EDIT_FLAG_KEEP_BLANK - Normally, OpenDoors will only display the
  3568.                          input field background (as passed in the "character"
  3569.                          parameter) while the user is editing the string, and
  3570.                          will remove it when the od_edit_str() function exits.
  3571.                          However, you may wish to continue having this field
  3572.                          displayed after input has taken place, and the
  3573.                          od_edit_str() function has exited. In this case,
  3574.                          setting this flag will cause the background characters
  3575.                          to remain visible after input has finished.
  3576.  
  3577.                EDIT_FLAG_PERMALITERAL - When the format string contains literal
  3578.                          characters (such as forcing a ':' character to be added
  3579.                          to a time input by using the format string
  3580.  
  3581.  
  3582. OpenDoors Door Toolkit Manual - Version 4.10                       Page 58
  3583.  
  3584.  
  3585.  
  3586.                          "##':'##':'##"), the od_edit_str() function can operate
  3587.                          in one of two modes. In the default mode, the literal
  3588.                          characters will only be displayed when they have been
  3589.                          automatically added to the string. For instance, if you
  3590.                          were inputting the current time using the above format
  3591.                          string, this mode would result in the input field
  3592.                          initially being blank. When the user types the first
  3593.                          digit of the time, that number would appear. When the
  3594.                          user types the second digit of the time, that number
  3595.                          will appear, and then the colon character will
  3596.                          automatically be added by OpenDoors. However, you can
  3597.                          also set the od_edit_str() function to operate in
  3598.                          "PermaLiteral" mode, by setting this flag. When the
  3599.                          EDIT_FLAG_PERMALITERAL flag is set, the input field
  3600.                          will initially contain the literal characters (ie, the
  3601.                          colons in our example), with the cursor still located
  3602.                          at the leftmost position in the input field. In this
  3603.                          mode, the literal character become a permanent part of
  3604.                          the input field, and can not be moved or deleted by the
  3605.                          user - instead the cursor simply skips over the literal
  3606.                          character's position.
  3607.  
  3608.                EDIT_FLAG_LEAVE_BLANK - This flag applies to the special case
  3609.                          where the first character or characters of the format
  3610.                          string are literals. By default, the od_edit_str()
  3611.                          function will always return a string containing at
  3612.                          least these first literal characters. However, you can
  3613.                          alter this behavious by setting this flag. When set, if
  3614.                          no non-literal characters have been entered in the
  3615.                          string, od_edit_str() will return an empty string.
  3616.  
  3617.  
  3618. SEE ALSO       od_input_str(), od_get_char(), od_clear_keybuffer()
  3619.  
  3620.  
  3621. EXAMPLE        Below are several examples of typical uses of the od_edit_str()
  3622.                function. For the sake of simplicity, all of these examples
  3623.                perform their input beginning at the top, left hand corner of the
  3624.                screen, and store the user's input in the string variable named
  3625.                "string". For an example of the user of the od_edit_str()
  3626.                function in a dialog-box / form entry application, see the
  3627.                example accompanying the od_draw_box() function.
  3628.  
  3629.                To input a name with a maximum of 25 characters, having the first
  3630.                letter of each word automatically capitalized:
  3631.  
  3632.                         od_edit_str(string, "MMMMMMMMMMMMMMMMMMMMMMMMM", 1, 1,
  3633.                                     0x03, 0x21, 176, EDIT_FLAG_NORMAL);
  3634.  
  3635.  
  3636.                To input a North American style phone number, requiring that all
  3637.                digits be filled, and running in "strict input" mode:
  3638.  
  3639.                         od_edit_str(string, "###'-'###'-'####",
  3640.                                     1, 1, 0x03, 0x21, 176,
  3641.                                     EDIT_FLAG_FILL_STRING|
  3642.  
  3643.  
  3644. OpenDoors Door Toolkit Manual - Version 4.10                       Page 59
  3645.  
  3646.  
  3647.  
  3648.                                     EDIT_FLAG_STRICT_INPUT);
  3649.  
  3650.  
  3651.                To allow the user to edit a previously entered 20 character
  3652.                string, with auto-delete mode on. Any characters will be
  3653.                permitted in the string. Remember that when the
  3654.                EDIT_FLAG_EDIT_STRING flag is set, the string must be initialized
  3655.                prior to calling the od_edit_str() function.
  3656.  
  3657.                         od_edit_str(string, "????????????????????",
  3658.                                     1, 1, 0x03, 0x21, 176,
  3659.                                     EDIT_FLAG_EDIT_STRING|
  3660.                                     EDIT_FLAG_AUTO_DELETE);
  3661.  
  3662.  
  3663.                To input a password of up to 16 characters from the user. Here,
  3664.                the password will only be permitted to contain upper case
  3665.                characters, and the od_edit_str() password mode is used, with a
  3666.                small block displayed in place of any characters typed:
  3667.  
  3668.                          od_edit_str(string, "UUUUUUUUUUUUUUUU",
  3669.                                      1, 1, 0x03, 0x21, 254,
  3670.                                      EDIT_FLAG_PASSWORD_MODE);
  3671.  
  3672.  
  3673.                To input a two-digit number from the user, requiring that both
  3674.                digits be filled, and automatically accepting the input after the
  3675.                two digits have been entered (not requiring the user to press
  3676.                [ENTER]):
  3677.  
  3678.                         od_edit_str(string, "##", 1, 1, 0x03, 0x21, 176,
  3679.                                     EDIT_FLAG_FILL_STRING|
  3680.                                     EDIT_FLAG_AUTO_ENTER);
  3681.  
  3682.  
  3683.                To input a filename to download, as a field in a dialog box.
  3684.                Here, the filename will be permitted to contain valid filename
  3685.                characters, and the od_input_str() function will operate in field
  3686.                mode, with the cancel [ESCape] key enabled. Also, string edit
  3687.                mode will be enabled, allowing the user to edit a previously
  3688.                entered line, and the EDIT_FLAG_KEEP_BLANK flag will be set,
  3689.                causing the field background to remain displayed after the user
  3690.                exits. This time, however, auto-delete mode will not be used.
  3691.                Note that this combination of parameters expects that the field
  3692.                and it's contents will have already been displayed, prior to
  3693.                calling the od_edit_str() function.
  3694.  
  3695.                         od_edit_str(string, "WWWWWWWWWWWW",
  3696.                                     1, 1, 0x03, 0x21, 176,
  3697.                                     EDIT_FLAG_EDIT_STRING|
  3698.                                     EDIT_FLAG_FIELD_MODE|
  3699.                                     EDIT_FLAG_ALLOW_CANCEL|
  3700.                                     EDIT_FLAG_KEEP_BLANK);
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706. OpenDoors Door Toolkit Manual - Version 4.10                       Page 60
  3707.  
  3708.  
  3709.  
  3710.                To input a string without the field background and line redrawing
  3711.                before and after input takes place:
  3712.  
  3713.                         od_edit_str(string, "******************************",
  3714.                                     1, 1, 0x07, 0x07, ' ',
  3715.                                     EDIT_FLAG_NO_REDRAW);
  3716.  
  3717.  
  3718.                To input a date, using permaliteral mode. Here, the month is
  3719.                entered by a three digit short form ("JAN", "FEB", etc.), and the
  3720.                literal characters such as the '-' and the "19" are a permanent
  3721.                part of the input field:
  3722.  
  3723.                         od_edit_str(string,"UUU'-'##'-19'##",
  3724.                                     1, 1, 0x03, 0x21, 176,
  3725.                                     EDIT_FLAG_PERMALITERAL|
  3726.                                     EDIT_FLAG_FILL_STRING);
  3727.  
  3728.  
  3729.  
  3730.  
  3731.  
  3732.  
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768. OpenDoors Door Toolkit Manual - Version 4.10                       Page 61
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776. OD_EMULATE()
  3777. --------------------------------------------------------------------------------
  3778.  
  3779. PURPOSE        Displays a character with ANSI/AVATAR emulation
  3780.  
  3781.  
  3782. FORMAT         void od_emulate(register char in_char);
  3783.  
  3784.  
  3785. RETURNS        N/A
  3786.  
  3787.  
  3788. DESCRIPTION    od_emulate() is a low-level function which allows you to display
  3789.                your own ANSI / AVATAR graphics sequences and QBBS/RA style
  3790.                control characters. This function passes the characters you wish
  3791.                to display to the OpenDoors terminal emulator, which is fully
  3792.                documented in the description of the od_send_file() function, on
  3793.                page 101. As a result, this function can be used to send these
  3794.                control sequences to the user's terminal, and also have them
  3795.                displayed on the local screen as they will appear to the user.
  3796.  
  3797.                The characters passed to the od_emulate() function will both be
  3798.                sent directly to the modem, and sent to the local screen, after
  3799.                being translated by the terminal emulator. Thus, if you were to
  3800.                send the characters ESCape,[,2,;,4,H to the emulator using this
  3801.                function, the cursor would be positioned at location 2 by 4 (on
  3802.                both the local and remote screens). Note that this function only
  3803.                accepts a single character at a time. The example below
  3804.                demonstrates a function to send an entire string of characters
  3805.                using the od_emulate() function.
  3806.  
  3807.                Note that if you wish to display an entire file containing
  3808.                ANSI/AVATAR graphics sequences (perhaps as your door's menu or
  3809.                title screen), use the od_send_file() function.
  3810.  
  3811.  
  3812. SEE ALSO       od_send_file(), od_disp(), od_disp_str() od_printf(), od_putch(),
  3813.                od_repeat().
  3814.  
  3815.                For a breakdown of the uses of the various OpenDoors display
  3816.                functions, see the od_disp_str() function, on page 46.
  3817.  
  3818.  
  3819. EXAMPLE        Below is an example of a function which will allow you do display
  3820.                strings of ANSI or AVATAR sequences, using the od_emulate()
  3821.                function:
  3822.  
  3823.                     void emulate_string(char *pointer)
  3824.                        {       /* loop through string, sending each character */
  3825.                        while(*pointer) od_emulate(*pointer++);
  3826.                        }
  3827.  
  3828.  
  3829.  
  3830. OpenDoors Door Toolkit Manual - Version 4.10                       Page 62
  3831.  
  3832.  
  3833.  
  3834.  
  3835.                Using this function you could have an ANSI sequence sent to the
  3836.                user's terminal program, and displayed on the local screen as it
  3837.                would appear on the user's screen. For example, to display the
  3838.                ANSI sequence of ESCape followed by "[2;4H", which just happens
  3839.                to move the cursor to location 2 by 4, you could:
  3840.  
  3841.                     emulate_string("\x1b[2;4H");
  3842.  
  3843.                (Note that \x1b represents the ESCape character, ASCII 27 or 1B
  3844.                in hexidecimal.)
  3845.  
  3846.  
  3847.  
  3848.  
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892. OpenDoors Door Toolkit Manual - Version 4.10                       Page 63
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900. OD_EXIT()
  3901. --------------------------------------------------------------------------------
  3902.  
  3903. PURPOSE        The OpenDoors program termination function
  3904.  
  3905.  
  3906. FORMAT         void od_exit(int errorlevel,char term_call);
  3907.  
  3908.  
  3909. RETURNS        N/A
  3910.  
  3911.  
  3912. DESCRIPTION    When writing a door program, you MUST USE THIS FUNCTION when you
  3913.                want your Door to exit. This function will deinitialize the
  3914.                fossil driver, re-write changed information to the EXITINFO.BBS
  3915.                file, call your end-of-program function (if any), and then exit
  3916.                with the errorlevel specified in the first parameter.
  3917.  
  3918.                Also, if the second parameter, "term_call", is set to TRUE,
  3919.                od_exit() will also log the user off (for options such as logging
  3920.                off within the door - as shown in the example below). This is
  3921.                accomplished by lowering the DTR line to the modem, causing the
  3922.                modem to hangup. When control is returned to the BBS, it will
  3923.                then detect that the user is no longer online, and will carry out
  3924.                its own logoff processing.
  3925.  
  3926.                If you wish for your program to always perform any activities
  3927.                prior to exiting, such as updating or closing data files, you
  3928.                should set a function to be executed from within the od_exit()
  3929.                function. This is accomplished by using the od_control.
  3930.                od_before_exit variable, as described in the section on the
  3931.                OpenDoors control structure in chapter 5. Use of this variable
  3932.                will allow your program to always carry out these activates, even
  3933.                if OpenDoors decides to call the od_exit() function itself, such
  3934.                as when a user hangs up on the door.
  3935.  
  3936.                Note that in special cases, you may use the od_control.od_disable
  3937.                variable to prevent the od_exit() function from re-writing the
  3938.                door information file. Also, you may use the od_control.od_noexit
  3939.                variable to shutdown door operations without actually exiting
  3940.                your program. Both of these variables are described in chapter 5.
  3941.  
  3942.                This function should not be used in utility program that only use
  3943.                the BBS interface module of OpenDoors, nor with any program that
  3944.                has not previously called the od_init(), or some other OpenDoors
  3945.                DOOR DRIVER function.
  3946.  
  3947.  
  3948. SEE ALSO       od_init()
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954. OpenDoors Door Toolkit Manual - Version 4.10                       Page 64
  3955.  
  3956.  
  3957.  
  3958. EXAMPLE        The example below demonstrates a function which a door could
  3959.                execute when the user chooses to exit the door. This function
  3960.                will ask the user whether they wish to exit the door and return
  3961.                to the BBS, simply logoff of the BBS, or continue using the door.
  3962.                The example function will then call od_exit() if the user wishes
  3963.                to exit the door, or return control to the function which called
  3964.                it, if the user does not wish to exit:
  3965.  
  3966.                void goodbye(void)
  3967.                   {
  3968.                   char pressed;
  3969.                                                    /* Display choices to user */
  3970.                   od_disp_str("You have chosen to exit this door.\n\r");
  3971.                   od_disp_str("Do you wish to:\n\r");
  3972.                   od_disp_str("      [R]eturn to the BBS\n\r");
  3973.                   od_disp_str("      [L]ogoff of the BBS\n\r");
  3974.                   od_disp_str("      [C]ontinue using the door\n\r");
  3975.  
  3976.                   for(;;)               /* loop until user makes valid choice */
  3977.                      {
  3978.                      pressed=od_get_key(TRUE);           /* Get key from user */
  3979.  
  3980.                                 /* If user selects R, exit without hanging up */
  3981.                      if(pressed=='R' || pressed=='r') od_exit(40,FALSE);
  3982.  
  3983.                                    /* If user selects L, hangup and then exit */
  3984.                      if(pressed=='L' || pressed=='l') od_exit(41,TRUE);
  3985.  
  3986.                       /* If user selects C, return and allow door to continue */
  3987.                      if(pressed=='C' || pressed=='c') return;
  3988.                      }
  3989.                   }
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016. OpenDoors Door Toolkit Manual - Version 4.10                       Page 65
  4017.  
  4018.  
  4019.  
  4020. OD_GET_ANSWER()
  4021. --------------------------------------------------------------------------------
  4022.  
  4023. PURPOSE        Function to allow the user to respond to a prompt using only
  4024.                certain keys.
  4025.  
  4026.  
  4027. FORMAT         char od_get_answer(char *string);
  4028.  
  4029.  
  4030. RETURNS        User's response to prompt
  4031.  
  4032.  
  4033. DESCRIPTION    This function can be used to get a response from the user, when
  4034.                only particular responses should be accepted. The parameter to
  4035.                the od_get_answer() function is simply a string listing the valid
  4036.                responses. The function will wait until the user selects one of
  4037.                the valid responses, and then return that response. The function
  4038.                is case insensitive, and will return the character in the same
  4039.                case that was supplied to it in the string.
  4040.  
  4041.  
  4042. SEE ALSO       od_get_key(), od_hotkey_menu()
  4043.  
  4044.  
  4045. EXAMPLES       od_get_answer("YN");
  4046.                     - If the user presses 'y', will return 'Y'.
  4047.  
  4048.                od_get_answer("yn");
  4049.                     - If the user presses 'y', will return 'y'.
  4050.  
  4051.                od_get_answer("ABC 123\nZ");
  4052.                     - Valid responses will be: [A], [B], [C], [SPACE],
  4053.                       [1], [2], [3], [ENTER], [Z]
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078. OpenDoors Door Toolkit Manual - Version 4.10                       Page 66
  4079.  
  4080.  
  4081.  
  4082.  
  4083. OD_GET_KEY()
  4084. --------------------------------------------------------------------------------
  4085.  
  4086. PURPOSE        Function to input a key from the user
  4087.  
  4088.  
  4089. FORMAT         int od_get_key(int wait);
  4090.  
  4091.  
  4092. RETURNS        The next key waiting from the keyboard, or 0 if none.
  4093.  
  4094.  
  4095. DESCRIPTION    This function retrieves the next key waiting in the OpenDoors
  4096.                keyboard buffer (see the description of the od_clear_keybuffer()
  4097.                function, on page 38, for more information on the OpenDoors
  4098.                keyboard buffer). The od_get_key() function allows your door to
  4099.                retrieve both those keystrokes pressed by the user, and the
  4100.                keystrokes pressed on the sysop keyboard (other than the sysop
  4101.                function keys), in the sequence they were pressed. Since input is
  4102.                accepted from both sources, it is possible for the sysop, as well
  4103.                as the remote user, to make selections and control the door.
  4104.  
  4105.                Door input with OpenDoors can be accomplished with this function,
  4106.                with the od_input_str() function or with the od_edit_str()
  4107.                function. The od_input_str() and od_edit_str() functions is used
  4108.                to input an entire sequence of characters from the user (a
  4109.                string), and requires the user to press the [Enter] key when they
  4110.                are finished typing their input. On the other hand, the
  4111.                od_get_key() function is used to input a single keystroke (one
  4112.                character) from the user, and allows the user to make choices
  4113.                without having to press the enter key.
  4114.  
  4115.                The od_get_key() function accepts a single parameter, which
  4116.                determines whether or not it should wait for the user to press a
  4117.                key, if they have not already done so. If you pass a FALSE value
  4118.                to od_get_key(), then the function will not wait for a key to be
  4119.                pressed at the keyboard, but instead return a 0 if there are no
  4120.                keys waiting in the buffer. If you pass a TRUE value to
  4121.                od_get_key(), then this function will instead wait for a key to
  4122.                be pressed. Also, while waiting for the user to press a key, the
  4123.                od_get_key() function will give up the processor to other waiting
  4124.                programs, if you door is running under DesqView.
  4125.  
  4126.                If you are waiting for the user to make a choice from a menu or
  4127.                list of options, you will most likely pass a TRUE to the
  4128.                od_get_key() function, indicating that you wish for it to wait
  4129.                until a key is pressed. However, if you wish to continue other
  4130.                processing if no key is yet available from the keyboard, you
  4131.                should pass a FALSE to the od_get_key() function. For example, if
  4132.                you are displaying a screen of text, and wish to allow the user
  4133.                to pause or abort the display, you would simply call the
  4134.                od_get_key() function every few moments, passing it a value of
  4135.                FALSE. You would then be able to check if any control keys have
  4136.                been pressed, and if not, continue displaying text.
  4137.  
  4138.  
  4139.  
  4140. OpenDoors Door Toolkit Manual - Version 4.10                       Page 67
  4141.  
  4142.  
  4143.  
  4144.                The od_get_key() function returns the ASCII value representing
  4145.                the keystroke that was made. If you are waiting for the user to
  4146.                make a particular choice, perhaps from a menu, you will most
  4147.                likely store the value returned by od_get_key() in a variable of
  4148.                type char. For example:
  4149.  
  4150.                       char key;
  4151.  
  4152.                       ...
  4153.  
  4154.                       key=od_get_key(TRUE);
  4155.  
  4156.                You would then be able to determine which key the user pressed by
  4157.                testing the value of key, either by comparing it's numerical
  4158.                ASCII value, or by comparing it to a character constant. If you
  4159.                are testing for a non-character key, such as [ESCape], [Tab] or
  4160.                [Return], you may wish to use the ASCII value of that key. For
  4161.                example, if you wished to take some action in the case that the
  4162.                user presses the [Enter]/[Return] key, who's ASCII value is 13,
  4163.                you could do:
  4164.  
  4165.                       key=od_get_key(TRUE);         /* Get keypress from user */
  4166.                       if(key==13)              /* If key was [Enter]/[Return] */
  4167.                          {
  4168.                          ...                       /* Whatever you want to do */
  4169.                          }
  4170.  
  4171.                A complete reference of all the ASCII values is listed below.
  4172.  
  4173.                To determine whether input originated from the local or remote
  4174.                keyboards, see the OpenDoors control structure variable
  4175.                od_last_input.
  4176.  
  4177.                If you wish, instead, to respond to the user pressing a character
  4178.                key (perhaps as a choice from a menu), you can do so by using
  4179.                character constants, such as 'c', '6', or 'F'. Also, when testing
  4180.                for an alphabetical character, you will probably want to check
  4181.                for the user pressing either the upper or lower-case version of
  4182.                the letter. For example, if you wished to have the user press the
  4183.                [Y] key to continue, you could test for either an upper or lower-
  4184.                case Y as follows:
  4185.  
  4186.                        key=od_get_key(TRUE);        /* Get keypress from user */
  4187.                        if(key=='y" || key=='Y")         /* If key was [y]/[Y] */
  4188.                           {
  4189.                           ...                      /* Whatever you want to do */
  4190.                           }
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202. OpenDoors Door Toolkit Manual - Version 4.10                       Page 68
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210. The chart below lists the decimal value and corresponding keystroke(s) of each
  4211. of the ASCII values from 0 to 127.
  4212.  
  4213.  
  4214. ASCII  KEYSTROKE                       |  ASCII   KEYSTROKE
  4215. -----  ------------------------------  |  -----   ----------------------
  4216.   0    [Control]-[@]                   |   15     [Control]-[O]
  4217.   1    [Control]-[A]                   |   16     [Control]-[P]
  4218.   2    [Control]-[B]                   |   17     [Control]-[Q]
  4219.   3    [Control]-[C]                   |   18     [Control]-[R]
  4220.   4    [Control]-[D]                   |   19     [Control]-[S]
  4221.   5    [Control]-[E]                   |   20     [Control]-[T]
  4222.   6    [Control]-[F]                   |   21     [Control]-[U]
  4223.   7    [Control]-[G]                   |   22     [Control]-[V]
  4224.   8    [Control]-[H]/[Backspace]       |   23     [Control]-[W]
  4225.   9    [Control]-[I]/[Tab]             |   24     [Control]-[X]
  4226.  10    [Control]-[J]                   |   25     [Control]-[Y]
  4227.  11    [Control]-[K]                   |   26     [Control]-[Z]
  4228.  12    [Control]-[L]                   |   27     [ESCape]
  4229.  13    [Control]-[M]/[Enter]/[Return]  |   32     [SpaceBar]
  4230.  14    [Control]-[N]                   |
  4231.  
  4232.  
  4233.  
  4234.  
  4235. ASCII  KEYSTROKE | ASCII  KEYSTROKE | ASCII  KEYSTROKE | ASCII  KEYSTROKE
  4236. -----  --------- | -----  --------- | -----  --------- | -----  ---------
  4237.  33       '!'    |  57       '9'    |  80       'P'    |  104      'h'
  4238.  34       '"'    |  58       ':'    |  81       'Q'    |  105      'i'
  4239.  35       '#'    |  59       ';'    |  82       'R'    |  106      'j'
  4240.  36       '$'    |  60       '<'    |  83       'S'    |  107      'k'
  4241.  37       '%'    |  61       '='    |  84       'T'    |  108      'l'
  4242.  38       '&'    |  62       '>'    |  85       'U'    |  109      'm'
  4243.  39    '\''  (') |  63       '?'    |  86       'V'    |  110      'n'
  4244.  40       '('    |  64       '@'    |  87       'W'    |  111      'o'
  4245.  41       ')'    |  65       'A'    |  88       'X'    |  112      'p'
  4246.  42       '*'    |  66       'B'    |  89       'Y'    |  113      'q'
  4247.  43       '+'    |  67       'C'    |  90       'Z'    |  114      'r'
  4248.  44       ','    |  68       'D'    |  91       '['    |  115      's'
  4249.  45       '-'    |  69       'E'    |  92    '\\'  (\) |  116      't'
  4250.  46       '.'    |  70       'F'    |  93       ']'    |  117      'u'
  4251.  47       '/'    |  71       'G'    |  94       '^'    |  118      'v'
  4252.  48       '0'    |  72       'H'    |  95       '_'    |  119      'w'
  4253.  49       '1'    |  73       'I'    |  96       '`'    |  120      'x'
  4254.  50       '2'    |  74       'J'    |  98       'b'    |  121      'y'
  4255.  51       '3'    |  75       'K'    |  99       'c'    |  122      'z'
  4256.  52       '4'    |  76       'L'    |  100      'd'    |  123      '{'
  4257.  53       '5'    |  77       'M'    |  101      'e'    |  124      '|'
  4258.  54       '6'    |  78       'N'    |  102      'f'    |  125      '}'
  4259.  55       '7'    |  79       'O'    |  103      'g'    |  126      '~'
  4260.  56       '8'    |                  |                  |  127    [DELete]
  4261.  
  4262.  
  4263.  
  4264. OpenDoors Door Toolkit Manual - Version 4.10                       Page 69
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272. SEE ALSO       od_input_str(), od_edit_str(), od_clear_keybuffer()
  4273.  
  4274.  
  4275. EXAMPLE        For examples of the use of the od_get_key() function, see the
  4276.                examples in the description portion, above, and the examples for
  4277.                the od_exit() and od_clear_keybuffer() functions. For further
  4278.                examples of this function, see the example door EZVote, described
  4279.                in the section beginning  on page 25.
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.  
  4307.  
  4308.  
  4309.  
  4310.  
  4311.  
  4312.  
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326. OpenDoors Door Toolkit Manual - Version 4.10                       Page 70
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334. OD_HOTKEY_MENU()
  4335. --------------------------------------------------------------------------------
  4336.  
  4337. PURPOSE        Function to display a menu file with hotkeys
  4338.  
  4339.  
  4340. FORMAT         char od_hotkey_menu(char *filename, char *hotkeys, char wait);
  4341.  
  4342.  
  4343. RETURNS        Key pressed in response to menu, or '\0' if none.
  4344.  
  4345.  
  4346. DESCRIPTION    This function can be used to display a menu from an ASCII, ANSI
  4347.                or AVATAR file, allowing the user to select an option at any time
  4348.                while the menu is being displayed. The od_hotkey_menu() function
  4349.                is quite similar to the od_send_file() function, and you should
  4350.                probably familiarize yourself with that function if you are going
  4351.                to use od_hotkey_menu(). Like od_send_file(), od_hotkey_menu()
  4352.                will display the file specified by filename, using the
  4353.                appropriate terminal emulation. If no extention is provided for
  4354.                the filename, OpenDoors will automatically search for matching
  4355.                files ending in .ASC, .ANS and .AVT extentions. OpenDoors will
  4356.                the select the appropriate file to display, based on the
  4357.                available files and available terminal emulation.
  4358.  
  4359.                The second parameter, hotkeys, is a string specifying the valid
  4360.                responses to the menu, in the same format as the string passed to
  4361.                the od_get_answer() function. If any of the characters listed in
  4362.                this string are pressed, either uppercase or lowercase versions,
  4363.                OpenDoors will immediately stop displaying the menu, and return
  4364.                with the value of the key pressed. The case (upper or lower)
  4365.                returned will always be identical to the case used in the hotkeys
  4366.                string. You can include the [ENTER] key as a valid hot key by
  4367.                including the \n character in the hotkey string.
  4368.  
  4369.                The third parameter passed to od_hotkey_menu(), wait, specifies
  4370.                whether OpenDoors should wait after displaying the menu for the
  4371.                user to make a valid selection from the menu (TRUE), or if it
  4372.                should exit immediately (FALSE). Normally, you will want to use
  4373.                the TRUE value when calling this function. This will allow you to
  4374.                use a single function call that will display the menu and always
  4375.                return the user's selection. If you wish to gain control as soon
  4376.                as OpenDoors has displayed the menu and sent it to the FOSSIL
  4377.                driver, you may specify FALSE for this parameter. In this case,
  4378.                if the user does not press any of the valid hot keys while the
  4379.                menu is being sent, the function will return the character '\0'.
  4380.  
  4381.  
  4382. SEE ALSO       od_send_file(), od_get_answer()
  4383.  
  4384.  
  4385.  
  4386.  
  4387.  
  4388. OpenDoors Door Toolkit Manual - Version 4.10                       Page 71
  4389.  
  4390.  
  4391.  
  4392. EXAMPLE        As an example of the use of the od_hotkey_menu() function,
  4393.                consider the following code fragment:
  4394.  
  4395.  
  4396.                     for(;;)                               /* Main pogram loop */
  4397.                          {              /* Display menu and get user's choice */
  4398.                          char choice=od_hotkey_menu("MAINMENU","123Q",TRUE");
  4399.  
  4400.                          switch(choice)     /* Perform the appropriate action */
  4401.                               {
  4402.                               case '1':
  4403.                                    od_printf("You selected one.\n\r");
  4404.                                    break;
  4405.  
  4406.                               case '2':
  4407.                                    od_printf("You selected two.\n\r");
  4408.                                    break;
  4409.  
  4410.                               case '3':
  4411.                                    od_printf("You selected three.\n\r");
  4412.                                    break;
  4413.  
  4414.                               case 'Q':
  4415.                                    od_exit(FALSE,10);
  4416.                               }
  4417.                          }
  4418.  
  4419.                This is an example of the main menu loop of a simple door that
  4420.                uses the od_hotkey_menu() function. The program will continue
  4421.                executing the for(;;) loop until the user chooses to exit the
  4422.                door. On each iteration of the loop, the od_hotkey_menu()
  4423.                function is called, to display the door's menu from the file
  4424.                MAINMENU.A??. The appropriate .ASC/.ANS/.AVT file will be chosen
  4425.                and displayed as the menu. The possible choices that may be made
  4426.                from the menu are specified by the string "123Q". Thus, whenever
  4427.                the user presses one of the keys [1], [2], [3] or [Q], the
  4428.                od_hotkey_menu() function will return immediately with the value
  4429.                of the key pressed. If the menu is still being displayed at the
  4430.                time when the key was pressed, menu display will cease at that
  4431.                moment. The program then executes a case statement, to respond to
  4432.                the user's key appropriately. If the user presses [1], [2] or [3]
  4433.                this door will output a simple message to the screen. If the user
  4434.                presses the [Q] key, the door will pass control back to the BBS.
  4435.  
  4436.  
  4437.  
  4438.  
  4439.  
  4440.  
  4441.  
  4442.  
  4443.  
  4444.  
  4445.  
  4446.  
  4447.  
  4448.  
  4449.  
  4450. OpenDoors Door Toolkit Manual - Version 4.10                       Page 72
  4451.  
  4452.  
  4453.  
  4454.  
  4455.  
  4456.  
  4457.  
  4458. OD_INIT()
  4459. --------------------------------------------------------------------------------
  4460.  
  4461. PURPOSE        To initialize OpenDoors activities
  4462.  
  4463.  
  4464. FORMAT         void od_init(void);
  4465.  
  4466.  
  4467. RETURNS        N/A
  4468.  
  4469.  
  4470. DESCRIPTION    This function initializes any door running under OpenDoors. This
  4471.                function must be called manually if you wish to access data about
  4472.                the user, etc., before you call any other OpenDoors functions.
  4473.                However, if you do not explicitly call the od_init() function, it
  4474.                will be called automatically on the first call to any other
  4475.                OpenDoors door driver function. The od_init() function reads
  4476.                information from the door information file, initializes
  4477.                communications with the modem, displays the status line, and sets
  4478.                up OpenDoors' internal data structures. For more information on
  4479.                what data is and is not available before od_init() has been
  4480.                called, please refer to the chapter on the OpenDoors control
  4481.                structure, which begins on page 119.
  4482.  
  4483.                The od_init() function will read the door information file which
  4484.                is located in the directory specified by the variable
  4485.                od_control.info_path. If this variable has not been set prior to
  4486.                calling the od_init() function, OpenDoors will expect to find the
  4487.                door information file in the current directory. Thus, if you wish
  4488.                your door to be able to be run in a directory other than the BBS
  4489.                system directory, it would be a good idea to allow the sysop
  4490.                using your door to specify the location of the door information
  4491.                file. For an example of setting the od_control.info_path
  4492.                variable, please see the example program located on page 122.
  4493.  
  4494.                Note that the od_init() function should not be called in any
  4495.                utility-only program (ie, programs which only use the BBS
  4496.                interface module of OpenDoors), or when you wish for your door
  4497.                program to run in "maintenance mode", as described and
  4498.                demonstrated in the example below.
  4499.  
  4500.                Also note that you can prevent the od_init() function from
  4501.                carrying out some of it's normal activities, such as attempting
  4502.                to read a door information file, by the use of the
  4503.                od_control.od_disable variable, as described in the section on
  4504.                the OpenDoors control structure, which begins on page 119.
  4505.  
  4506.  
  4507. SEE ALSO       od_exit()
  4508.  
  4509.  
  4510.  
  4511.  
  4512. OpenDoors Door Toolkit Manual - Version 4.10                       Page 73
  4513.  
  4514.  
  4515.  
  4516. EXAMPLE        At times, you may wish to write a door program which will require
  4517.                a maintenance utility to be run on a regular basis. For example,
  4518.                a game door may have to have its system files updated on a daily
  4519.                basis, by having a utility program run in a system event each day
  4520.                at midnight. One way of accomplishing this would be to have your
  4521.                door package include two .EXE files, one being the actual door
  4522.                program, and the other being a utility program. However, another
  4523.                option would be to have both the door and maintenance functions
  4524.                to be accessible from a single .EXE file, in order to simplify
  4525.                use of the door for the sysop. In this case, you would want to
  4526.                test the command line to determine whether your program should
  4527.                run in door mode or maintenance mode. You would then only execute
  4528.                the od_init() function, along with the rest of your door code, if
  4529.                you program were running in "door mode".
  4530.  
  4531.                The program below demonstrates one method of doing just this. In
  4532.                this case, the program would include two functions, door(), which
  4533.                would carry out all of the door-related activities, and maint(),
  4534.                which would carry out all of the maintenance-related activities.
  4535.                In this simple example, if the command line includes a "-M" or
  4536.                "/M", the program will run in maintenance mode, otherwise it will
  4537.                run in door mode. Also, if it is running in door mode, the
  4538.                program will take the first command-line parameter, if any, as a
  4539.                path to the location of the door information file.
  4540.  
  4541.  
  4542.                #include "opendoor.h"
  4543.  
  4544.                void door(void);
  4545.                void maint(void);
  4546.  
  4547.  
  4548.                int main(int argc, char *argv[])
  4549.                   {
  4550.                   int counter;
  4551.  
  4552.                             /* Check any command line parameters for /M or -M */
  4553.                   for(counter=1;counter<argc;++counter)
  4554.                      {
  4555.                      if((argv[counter])[1]=='m' || (argv[counter])[1]=='M')
  4556.                         {
  4557.                         maint();                /* Then carry out maintenance */
  4558.                         exit(20);                                 /* And exit */
  4559.                         }
  4560.                      }
  4561.                            /* If there was no -M or /M, then run in door mode */
  4562.  
  4563.                   /* If there are any command-line parameters, take the first */
  4564.                                   /* as the path to the door information file */
  4565.                   if(argc>1) strncpy(od_control.info_path,argv[1],59);
  4566.  
  4567.                   od_init();                   /* call the od_init() function */
  4568.                   door();              /* Run the door portion of the program */
  4569.                   od_exit(30,FALSE);                     /* Shutdown the door */
  4570.                   }
  4571.  
  4572.  
  4573.  
  4574. OpenDoors Door Toolkit Manual - Version 4.10                       Page 74
  4575.  
  4576.  
  4577.  
  4578.  
  4579.                void maint(void)
  4580.                   {
  4581.                   ...                /* Carry out maintenance activities here */
  4582.                   }
  4583.  
  4584.  
  4585.                void door(void)
  4586.                   {
  4587.                   ...                       /* Carry out door activities here */
  4588.                   }
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636. OpenDoors Door Toolkit Manual - Version 4.10                       Page 75
  4637.  
  4638.  
  4639.  
  4640.  
  4641.  
  4642.  
  4643.  
  4644. OD_INIT_WITH_CONFIG()
  4645. --------------------------------------------------------------------------------
  4646.  
  4647. PURPOSE        To initialize OpenDoors activities, parsing a configuration file.
  4648.  
  4649.  
  4650. FORMAT         void od_init_with_config(char *filename,
  4651.                         (*custom_line_function) (char *keyword,char *options) );
  4652.  
  4653.  
  4654. RETURNS        N/A
  4655.  
  4656.  
  4657. DESCRIPTION    This function can be used instead of the od_init() function, to
  4658.                begin OpenDoor's operations. This function performs all of the
  4659.                initialization activities that the od_init() function does, and
  4660.                also reads any information in the door's configuration file. The
  4661.                configuration file system automatically provides support for a
  4662.                considerable number of sysop configurable options, such as system
  4663.                directories, BBS information, display colours, custom door
  4664.                information file formats, maximum time within the door, and so
  4665.                on. To familiarize yourself more with the OpenDoors configuration
  4666.                file format, it is suggested that you examine the example
  4667.                configuration file, EZVOTE.CFG. Feel free to distribute the
  4668.                EZVOTE.CFG or a modified version of the file with your own doors.
  4669.  
  4670.                The od_init_with_config() function accepts two parameters. The
  4671.                first parameter specifies the name of the configuration file that
  4672.                OpenDoors should look for. If no configuration file is found, the
  4673.                od_init_with_config() will continue initialization normally,
  4674.                using the default settings. This means that the configuration
  4675.                file is always optional, and that OpenDoors is designed to
  4676.                continue normally if the sysop elects not to use a configuration
  4677.                file.
  4678.  
  4679.                OpenDoors will first search for the configuration file in the
  4680.                directory specified on the od_init_with_config() command line. If
  4681.                the configuration file is not found there, OpenDoors will search
  4682.                in the current dirrectory. If the configuration file is still not
  4683.                found, it will then look for the file in the directory where the
  4684.                door's .EXE file is located.
  4685.  
  4686.                The format for the configuration file is as follows. Blank lines
  4687.                and any text following the semi-colon (;) character are ignored.
  4688.                Configuration options are specified using a keyword, possibly
  4689.                followed by one or more options. The keywords are not case
  4690.                sensitve, but some of the options are. The order of options in
  4691.                the configuration file is not significant. The built-in
  4692.                configuration options are as follow:
  4693.  
  4694.                BBSDir - BBS System directory. Indicates where the door
  4695.                     information file (drop file) can be found.
  4696.  
  4697.  
  4698. OpenDoors Door Toolkit Manual - Version 4.10                       Page 76
  4699.  
  4700.  
  4701.  
  4702.  
  4703.                DoorDir - The door's working directory. This is where the door's
  4704.                     system files are located. OpenDoors will automaticaly
  4705.                     perform a chdir into this directory at initialization, and
  4706.                     will return to the original directory on exit.
  4707.  
  4708.                LogFileName - Specifies the filename (path optional) where the
  4709.                     door should record log information.
  4710.  
  4711.                DisableLogging - Prevents door from writing to a log file.
  4712.  
  4713.                Node - BBS node number that the door is running on. Only used if
  4714.                     OpenDoors is unable to determine the node number by some
  4715.                     other means.
  4716.  
  4717.                ???dayPagingHours - Specifies sysop paging hours. Sysop paging
  4718.                     will be permitted beginning at the start time, up until, but
  4719.                     not including, the end time. Times should be in the 24-hour
  4720.                     format. To disable paging on a particular day, set the
  4721.                     paging start and end times to the same time. ???day can be
  4722.                     one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday
  4723.                     or Saturday.
  4724.  
  4725.                PagDuration - Duration of sysop page. Value indicates the number
  4726.                     of beeps that compose the sysop page alarm.
  4727.  
  4728.                MaximumDoorTime - Maximum length of time a user is permitted to
  4729.                     access the door. If the user's total remaining time on the
  4730.                     BBS is less than this value, the user will only be permitted
  4731.                     to access the door for this shorter length of time. This
  4732.                     option is disabled by commenting out the line.
  4733.  
  4734.                InactivityTimeout - Specifies the maximum number of seconds that
  4735.                     may elapse without the user pressing a key, before the user
  4736.                     will automatically be disconnected. A value of 0 disables
  4737.                     inactivity timeouts.
  4738.  
  4739.                SysopName - Name of the sysop. OpenDoors can usually determine
  4740.                     the sysop's name from the door information (drop) file.
  4741.                     How3ever, some BBS packages do not supply this information.
  4742.                     In such cases, if the sysop's name is required by the door,
  4743.                     it may be supplied here.
  4744.  
  4745.                SystemName - Like the sysop's name, this option can usually be
  4746.                     determined from the door information file. If it is not
  4747.                     available, the sysop my supply the information here.
  4748.  
  4749.                ChatUserColour - Specifies the colour of text typed by the user
  4750.                     in sysop chat mode. The format of the colour name is
  4751.                     included in the description of the od_colour_config()
  4752.                     function.
  4753.  
  4754.                ChatSysopColour - Specifies the colour of test typed by the sysop
  4755.                     in chat mode.
  4756.  
  4757.                FileListTitleColour - Files.BBS listing colours.
  4758.  
  4759.  
  4760. OpenDoors Door Toolkit Manual - Version 4.10                       Page 77
  4761.  
  4762.  
  4763.  
  4764.                FileListNameColour
  4765.                FileListSizeColour
  4766.                FileListDescriptionColour
  4767.                FileListOfflineColour
  4768.  
  4769.                SwappingDir - Directory where disk swapping will be done.
  4770.  
  4771.                SwappingNoEMS - Disables swapping to EMS memory.
  4772.  
  4773.                SwappingDisable - Disables swapping entirely.
  4774.  
  4775.                LockedBPS -  BPS rate at which door should communicate with the
  4776.                     modem.  Valid rates are 300, 600, 1200, 2400, 4800, 9600,
  4777.                     19200 and 38400. A value of 0 forces the door to always
  4778.                     operate in local mode. This option is not normally needed,
  4779.                     as the information is usually available from the door
  4780.                     information file.
  4781.  
  4782.                FossilPort - Specifies the FOSSIL driver prot number tha tthe
  4783.                     modem is connected to. FOSSIL port 0 usually corresponds to
  4784.                     COM!, port 1 to COM2, and so on. This option is not normally
  4785.                     needed, as the information is usually available from the
  4786.                     door information file.
  4787.  
  4788.                CustomFileName - Specifies the filename used by the custom door
  4789.                     information file format. Described in more detail below.
  4790.  
  4791.                CustomFileLine - Specifies the contents of a particular line in
  4792.                     the custom door information file format.
  4793.  
  4794.  
  4795.                Two of the most powerful options of the configuration file are
  4796.                those that allow the sysop to specify a custom door information
  4797.                file format. To permit OpenDoors doors to operate on BBS systems
  4798.                that produce a door information file format not directly
  4799.                supported by OpenDoors, the sysop may define a custom door
  4800.                information file format. A custom door information file format is
  4801.                defined using the "CustomFileName" option, followed by one or
  4802.                more lines beginning with the "CustomFileLine" option.
  4803.  
  4804.                The "CustomFileName" option specifies the filename used to
  4805.                distinguish this file format from other file formats. This
  4806.                filename should not include a path. To specify the path where the
  4807.                door information file is located, use the BBSDir setting, near
  4808.                the beginning of this file. If the filename of the custom format
  4809.                is the same as that of one of the built-in formats, the custom
  4810.                format will override the built-in format.
  4811.  
  4812.                The actual format of the custom file is specified using a number
  4813.                of lines that begin with the keyword "CustomFileLine". Each of
  4814.                these lines will correspond to a single line in the door
  4815.                information file, with the option following the "CustomFileLine"
  4816.                keyword specifying the information that can
  4817.                be found on that line. This can be one of the following keywords:
  4818.  
  4819.  
  4820.  
  4821.  
  4822. OpenDoors Door Toolkit Manual - Version 4.10                       Page 78
  4823.  
  4824.  
  4825.  
  4826.                     Ignore - Causes the next line in the door information file
  4827.                          to be ignored. Use on lines for which none of the
  4828.                          options below apply.
  4829.  
  4830.                     COMPORT - COM? port the modem is connected to (0 indicates
  4831.                          local mode)
  4832.  
  4833.                     FOSSILPORT - Fossil port number the modem is connected to
  4834.  
  4835.                     MODEMBPS - BPS rate at which to communicate with modem (0 or
  4836.                          non-numerical value indicates local mode)
  4837.  
  4838.                     LOCALMODE - 1, T or Y if door is operating in local mode
  4839.  
  4840.                     USERNAME - Full name of the user
  4841.  
  4842.                     USERFIRSTNAME - First name(s) of the user
  4843.  
  4844.                     USERLASTNAME - Last name of the user
  4845.  
  4846.                     ALIAS - The user's psuedonym / handle
  4847.  
  4848.                     HOURSLEFT - Hours user has left online
  4849.  
  4850.                     MINUTESLEFT - Minutes user has left online, or time left
  4851.                          online in format hh:mm
  4852.  
  4853.                     SECONDSLEFT - Seconds user has left online, or time left
  4854.                          online in format hh:mm:ss or format mm:ss (If more than
  4855.                          one of the above time options are used, the user time
  4856.                          left is taken to be the total of all of these values.)
  4857.  
  4858.                     ANSI - 1, T, Y or G for ANSI graphics mode
  4859.  
  4860.                     AVATAR - 1, T or Y for AVATAR graphics mode
  4861.  
  4862.                     PAGEPAUSING - 1, T or Y if user wishes a pause at end of
  4863.                          screen
  4864.  
  4865.                     SCREENLENGTH - Number of lines on user's screen
  4866.  
  4867.                     SCREENCLEARING - 1, T or Y if screen clearing mode is on
  4868.  
  4869.                     SECURITY - The user's security level / access level
  4870.  
  4871.                     CITY - City the user is calling from
  4872.  
  4873.                     NAME - Node number user is connected to
  4874.  
  4875.                     SYSOPNAME - Full name of the sysop
  4876.  
  4877.                     SYSOPFIRSTNAME - The sysop's first name(s)
  4878.  
  4879.                     SYSOPLASTNAME - The sysop's last name
  4880.  
  4881.                     SYSTEMNAME - Name of the BBS
  4882.  
  4883.  
  4884. OpenDoors Door Toolkit Manual - Version 4.10                       Page 79
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.                You can also extend OpenDoor's configuration file format to add
  4891.                your own option, by supplying od_init_with_config with a custom
  4892.                line function. A pointer to the custom line function is provided
  4893.                as the second parameter to the od_init_with_config() function. If
  4894.                you do not wish to add any custom lines to the configuration
  4895.                file, simply pass the value NULL to the function. For an example
  4896.                of implementing a custom line function, the example code at the
  4897.                end of this section on configuration files. The custom line
  4898.                function should accept two pointers to strings and return "void".
  4899.                If a custom line function has been specified, whenever the
  4900.                configuration file system encounters an unknown configuration
  4901.                option, it will call your custom line function. The first
  4902.                parameter that the configuration system passes to your function
  4903.                is a pointer to the string containing the keyword found, in upper
  4904.                case. The second parameter will be the text of the configuration
  4905.                file line. For instance, if the following line were encountered
  4906.                in the configuration file:
  4907.  
  4908.                     RegisteredTo    John Smith      ; Sysop's name
  4909.  
  4910.                The parameters passed to your function would be:
  4911.  
  4912.                     char *keyword = "REGISTEREDTO"
  4913.                     char *options = "John Smith"
  4914.  
  4915.                Your custom line function should be written in such a way that if
  4916.                OpenDoors passes a configuration option to your function that
  4917.                your function does not recognize, that option should simply be
  4918.                ignored.
  4919.  
  4920.                All of the keywords used within the OpenDoors configuration file
  4921.                are language customizable. These prompts are specified in two
  4922.                global variables, od_config_text and od_config_lines. The default
  4923.                definitions for these arrays are as follows:
  4924.  
  4925.                char *od_config_text[12]={"Node",
  4926.                                          "BBSDir",
  4927.                                          "DoorDir",
  4928.                                          "LogFileName",
  4929.                                          "DisableLogging",
  4930.                                          "SundayPagingHours",
  4931.                                          "MondayPagingHours",
  4932.                                          "TuesdayPagingHours",
  4933.                                          "WednesdayPagingHours",
  4934.                                          "ThursdayPagingHours",
  4935.                                          "FridayPagingHours",
  4936.                                          "SaturdayPagingHours",
  4937.                                          "MaximumDoorTime",
  4938.                                          "SysopName",
  4939.                                          "SystemName",
  4940.                                          "SwappingDisable",
  4941.                                          "SwappingDir",
  4942.                                          "SwappingNoEMS",
  4943.                                          "LockedBPS",
  4944.  
  4945.  
  4946. OpenDoors Door Toolkit Manual - Version 4.10                       Page 80
  4947.  
  4948.  
  4949.  
  4950.                                          "FossilPort",
  4951.                                          "CustomFileName",
  4952.                                          "CustomFileLine",
  4953.                                          "InactivityTimeout",
  4954.                                          "PageDuration"};
  4955.  
  4956.                char *od_config_lines[24]={"Ignore",
  4957.                                           "ComPort",
  4958.                                           "FossilPort",
  4959.                                           "ModemBPS",
  4960.                                           "LocalMode",
  4961.                                           "UserName",
  4962.                                           "UserFirstName",
  4963.                                           "UserLastName",
  4964.                                           "Alias",
  4965.                                           "HoursLeft",
  4966.                                           "MinutesLeft",
  4967.                                           "SecondsLeft",
  4968.                                           "ANSI",
  4969.                                           "AVATAR",
  4970.                                           "PagePausing",
  4971.                                           "ScreenLength",
  4972.                                           "ScreenClearing",
  4973.                                           "Security",
  4974.                                           "City",
  4975.                                           "Node",
  4976.                                           "SysopName",
  4977.                                           "SysopFirstName",
  4978.                                           "SysopLastName",
  4979.                                           "SystemName"};
  4980.  
  4981.  
  4982. SEE ALSO       od_init(), od_colour_config()
  4983.  
  4984. EXAMPLE        Below is an example of using a custom line function to add
  4985.                additional options to the default settings in the configuration
  4986.                file.
  4987.  
  4988.  
  4989.                #include "opendoor.h"                   /* Include opendooor.h */
  4990.                                         /* Prototype for custom line funciton */
  4991.                void custom_line_function(char *keyword, char *options);
  4992.  
  4993.                unsigned long key=0L;  /* Variables for our own config opation */
  4994.                unsigned char default_colour=0x07;
  4995.                char display_winners=FALSE;
  4996.  
  4997.                main()                      /* Program's execution begins here */
  4998.                   {             /* Begin door operations, reading config file */
  4999.                   od_init_with_config("DOOR.CFG",custom_line_function);
  5000.  
  5001.                                          /* Main program's operations go here */
  5002.  
  5003.                   od_exit(FALSE,10);                             /* Exit door */
  5004.                   }
  5005.  
  5006.  
  5007.  
  5008. OpenDoors Door Toolkit Manual - Version 4.10                       Page 81
  5009.  
  5010.  
  5011.  
  5012.                                              /* Code for custom line function */
  5013.                void custom_line_function(char *keyword, char *options)
  5014.                   {                          /* If option is registration key */
  5015.                   if(strcmp(keyword,"REGISTRATIONKEY")==0)
  5016.                      {
  5017.                      key=atol(options);              /* Store key in variable */
  5018.                      }                            /* If option is text colour */
  5019.                   else if(strcmp(keyword,"DEFAULTCOLOUR")==0)
  5020.                      {           /* Get colour value using od_colour_config() */
  5021.                      default_colour=od_colour_config(options);
  5022.                      }       /* Example of option enabled by just the keyword */
  5023.                   else if(strcmp(keyword,"DISPLAYWINNERS")==0)
  5024.                      {               /* If keyword is present, turn on option */
  5025.                      display_winners=TRUE;
  5026.                      }
  5027.                   }
  5028.  
  5029.  
  5030.  
  5031.  
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039.  
  5040.  
  5041.  
  5042.  
  5043.  
  5044.  
  5045.  
  5046.  
  5047.  
  5048.  
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070. OpenDoors Door Toolkit Manual - Version 4.10                       Page 82
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078. OD_INPUT_STR()
  5079. --------------------------------------------------------------------------------
  5080.  
  5081. PURPOSE        Inputs a string from the user
  5082.  
  5083.  
  5084. FORMAT         void od_input_str(char *string,int max_len,char minchar, char
  5085.                maxchar);
  5086.  
  5087.  
  5088. RETURNS        N/A
  5089.  
  5090.  
  5091. DESCRIPTION    To perform string input within OpenDoors, one of two functions
  5092.                can be used, od_input_str() and od_edit_str(). The first
  5093.                function, od_input_str(), allows simple line input and editing,
  5094.                and can be used in ASCII, ANSI and AVATAR modes. The second
  5095.                function, od_edit_str(), allows many formatted input options,
  5096.                advanced line editing, and other features, but requires the use
  5097.                of ANSI or AVATAR graphics modes.
  5098.  
  5099.                The od_input_str() function allows you to input a string from the
  5100.                user. The string will be permitted to have up to the number of
  5101.                characters specified by the max_len parameter, and all characters
  5102.                must be between the values of the min_char and max_char
  5103.                parameters. This function will wait until the user presses the
  5104.                [Enter] key to finish inputting the string.
  5105.  
  5106.                The first parameter passed to this function should be a pointer
  5107.                to the string where the user's input should be stored. So, if you
  5108.                wanted to store a string of up to 30 characters inputted by the
  5109.                user, you might define this string as follows:
  5110.  
  5111.                          char input_string[31];
  5112.  
  5113.                Notice here than the string must be long enough to hold the
  5114.                thirty characters which can be entered by the user, along with
  5115.                the additional "null" character which is used to indicate the end
  5116.                of a string in C. Hence, the length of the string should always
  5117.                be at least one greater than the total number of characters the
  5118.                user is permitted to enter, passed in the max_len parameter.
  5119.  
  5120.                The second parameter passed to the od_input_str() function should
  5121.                be an integer value indicating the maximum number of characters
  5122.                which can be input by the user. For example, if this parameter
  5123.                had a value of 10, the user would be able to enter a string
  5124.                containing any number of characters up to and including 10
  5125.                characters. If this parameter had a value of 1, the user would
  5126.                only be able to enter a single character. However, the user would
  5127.                be able to backspace, change the character, and press [Enter]
  5128.                when they were satisfied with their entry. Note that even if you
  5129.                only ask the od_input_str() function to input a single character,
  5130.  
  5131.  
  5132. OpenDoors Door Toolkit Manual - Version 4.10                       Page 83
  5133.  
  5134.  
  5135.  
  5136.                it will still expect a STRING to be passed to it, and will return
  5137.                a string with either zero or one character, followed by a null
  5138.                (string terminator) character.
  5139.  
  5140.                The third and fourth parameters passed to this function allow you
  5141.                to control what characters the user will be permitted to enter as
  5142.                part of the string. For example, you could set the minimum
  5143.                character to the '0' character and the maximum character to the
  5144.                '9' character, permitting the user to only enter numeric
  5145.                characters. On the other hand, you could permit the user to enter
  5146.                all ASCII characters in the range from 32 to 127. The
  5147.                od_input_str() function will permit characters in the range
  5148.                beginning with the character passed as minchar, up to and
  5149.                including the character passed as maxchar.
  5150.  
  5151.  
  5152. SEE ALSO       od_edit_str(), od_get_key(), od_clear_keybuffer()
  5153.  
  5154.  
  5155. EXAMPLE        Below are a number of examples of the use of the od_input_str()
  5156.                function in various applications:
  5157.  
  5158.                  - To input a two character number (only digits from 0-9):
  5159.  
  5160.                         od_input_str(string,2,'0','9');
  5161.  
  5162.                  - To input a 35 character name (characters from Space to
  5163.                    ASCII 127):
  5164.  
  5165.                         od_input_str(string,35,32,127);
  5166.  
  5167.  
  5168.  
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.  
  5192.  
  5193.  
  5194. OpenDoors Door Toolkit Manual - Version 4.10                       Page 84
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202. OD_KERNAL()
  5203. --------------------------------------------------------------------------------
  5204.  
  5205. PURPOSE        The OpenDoors Central Control function
  5206.  
  5207.  
  5208. FORMAT         void od_kernal(void);
  5209.  
  5210.  
  5211. RETURNS        N/A
  5212.  
  5213.  
  5214. DESCRIPTION    The od_kernal() function is responsible for many vital OpenDoors
  5215.                tasks, such as monitoring the carrier detect signal, monitoring
  5216.                the amount of time that the user has remaining, updating the
  5217.                status line, responding to sysop hotkeys, and reading characters
  5218.                which are received from the modem. The od_kernal() function is
  5219.                automatically called on a frequent basis by the other OpenDoors
  5220.                door driver functions, so most often you will not need to be
  5221.                concerned with this function. However, in order that OpenDoors
  5222.                can carry out the activities mentioned above with a quick
  5223.                response, it is important that od_kernal(), or some other
  5224.                OpenDoors door driver function be called at least once every
  5225.                second. Thus, if your program will be carrying out some
  5226.                processing, in which it will not be calling any OpenDoors door
  5227.                driver functions for more than a second or so, you should call
  5228.                the od_kernal() function yourself. The example below demonstrates
  5229.                one method of doing just this.
  5230.  
  5231.                Note that if for some reason or other, it is not possible for
  5232.                your program to call the od_kernal() function, or any other
  5233.                OpenDoors door driver functions for a period of several seconds,
  5234.                this will not cause your door to crash or fail in any way. The
  5235.                only problem will be that OpenDoors will not be able to respond
  5236.                to any action, such as the sysop pressing a function key, or the
  5237.                user dropping carrier, until such time as you next call
  5238.                od_kernal(), or some OpenDoors door driver function. Hence, use
  5239.                of the od_kernal() function will improve the quality and response
  5240.                time of your program, but calling it or some OpenDoors door
  5241.                driver function on a regular basis is not absolutely vital.
  5242.  
  5243.  
  5244. EXAMPLE        As mentioned above, if it is possible that several seconds may
  5245.                pass between your program calling any OpenDoors door driver
  5246.                functions, it would be a good idea for you to call the
  5247.                od_kernal() function on a regular basis. Below is an example of a
  5248.                door_sleep() function, which will pause for the specified amount
  5249.                of time, while continually calling the od_kernal() function. This
  5250.                function will thus allow a door program to pause for a given
  5251.                length of time, perhaps after having displayed its title screen,
  5252.                or in order to add special effects to an ANSI animation. In this
  5253.                case, the program will be able to respond to events such as the
  5254.  
  5255.  
  5256. OpenDoors Door Toolkit Manual - Version 4.10                       Page 85
  5257.  
  5258.  
  5259.  
  5260.                sysop pressing function keys, or the user dropping carrier, while
  5261.                it is pausing.
  5262.  
  5263.  
  5264.                void door_sleep(int seconds)
  5265.                   {                 /* Calculate the timer tick to wait until */
  5266.                   long until=(*(long far *)0x46cL)+(18L*(long)seconds);
  5267.  
  5268.                    /* Loop until the specified number of seconds have expired */
  5269.                   while(until>*(long far *)0x46cL)
  5270.                      {
  5271.                      od_kernal();              /* Repeatedly call od_kernal() */
  5272.                      }
  5273.                   }
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.  
  5286.  
  5287.  
  5288.  
  5289.  
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318. OpenDoors Door Toolkit Manual - Version 4.10                       Page 86
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326. OD_LIST_FILES()
  5327. --------------------------------------------------------------------------------
  5328.  
  5329. PURPOSE        Lists files in a particular file area (using FILES.BBS)
  5330.  
  5331.  
  5332. FORMAT         int od_list_files(char *directory);
  5333.  
  5334.  
  5335. RETURNS        TRUE if successful, FALSE if unsuccessful
  5336.  
  5337.  
  5338. DESCRIPTION    This function allows you to display a list of files available for
  5339.                download from a particular file area, as any BBS system would.
  5340.                The file names and descriptions are taken from the FILES.BBS
  5341.                located in the directory pointed to by *directory. Thus, to list
  5342.                the files available for download in C:\APEX\FILES\UPLOADS,
  5343.                simply:
  5344.  
  5345.                       od_list_files("C:\\APEX\\FILES\\UPLOADS");
  5346.  
  5347.                OpenDoors uses a third-generation FILES.BBS format, that is
  5348.                compatible with other FILES.BBS formats, but adds some additional
  5349.                features. Each line in the FILES.BBS file lists a filename, along
  5350.                with it's description. Thus, a typical FILES.BBS file might look
  5351.                as follows:
  5352.  
  5353.                         PKZ110.EXE    PKZip file compressor, version 1.10
  5354.                         ODOORS40.LZH  The newest version of OpenDoors!
  5355.                         EZVOTE40.ZIP  EZVote user voting door.
  5356.                         BID12.ZIP     BBS info. door for new BBS users
  5357.  
  5358.                When displayed, OpenDoors will list the size of each file found
  5359.                in the FILES.BBS file beside it's name, if the file is found. If
  5360.                the file does not exist, then a "[OFFLINE]" string is displayed
  5361.                in the file size column. Title lines may also be added to the
  5362.                FILES.BBS, by indenting them one or more columns. Thus, you could
  5363.                have something like:
  5364.  
  5365.                            NEWEST UPLOADS
  5366.                            ~~~~~~~~~~~~~~
  5367.                         PKZ110.EXE    PKZip file compressor, version 1.10
  5368.                         ODOORS40.LZH  The newest version of OpenDoors!
  5369.                         EZVOTE40.ZIP  EZVote user voting door.
  5370.                         BID12.ZIP     BBS info. door for new BBS users
  5371.  
  5372.                In addition to this standard FILES.BBS format, OpenDoors will
  5373.                also permit wildcards to be used in FILES.BBS filenames (ie
  5374.                FNEWS???.*), or full directory paths to allow files from several
  5375.                different directories to be included in the same files area.
  5376.  
  5377.  
  5378.  
  5379.  
  5380. OpenDoors Door Toolkit Manual - Version 4.10                       Page 87
  5381.  
  5382.  
  5383.  
  5384.                You may alter the colours used to display the various portions of
  5385.                the files list using the od_control variables:
  5386.  
  5387.                          od_control.od_list_title_col
  5388.                          od_control.od_list_name_col
  5389.                          od_control.od_list_size_col
  5390.                          od_control.od_list_comment_col
  5391.                          od_control.od_list_offline_col
  5392.  
  5393.                which are documented in the OpenDoors control structure section
  5394.                on this manual, which begins on page 119.
  5395.  
  5396.  
  5397. SEE ALSO       od_read_files(), od_write_files(), od_send_file()
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.  
  5428.  
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442. OpenDoors Door Toolkit Manual - Version 4.10                       Page 88
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449. OD_LOG_OPEN()
  5450. --------------------------------------------------------------------------------
  5451.  
  5452. PURPOSE        Opens a log file and begins logging activities, if logging has
  5453.                not been disabled.
  5454.  
  5455.  
  5456. FORMAT         int od_log_open(void);
  5457.  
  5458.  
  5459. RETURNS        TRUE on success or if logging is disabled
  5460.                FALSE if unsuccessful
  5461.  
  5462.  
  5463. DESCRIPTION    This function will cause OpenDoors to open the log file and begin
  5464.                logging activities, unless logging has been disabled with the
  5465.                od_logfile_disable variable. The log file name will be taken from
  5466.                the od_logfile_name variable, which is usually set by the
  5467.                configuration file. If no logfile name has been set,
  5468.                od_log_open() will use the logfile named DOOR.LOG. Upon opening
  5469.                the log file, OpenDoors will write an entry indicating the time
  5470.                at which the use entered the door.
  5471.  
  5472.                OpenDoors uses the "FrontDoor format" logfile standard. This was
  5473.                chosen as it is a clearly documented format that is quickly
  5474.                becoming the standard for bulletin board software log files. A
  5475.                segment from a log file produced by OpenDoors is listed below.
  5476.  
  5477.                          ----------  Thu 25 Feb 93, EZVote 4.10
  5478.                          > 19:42:23  Brian Pirie entering door
  5479.                          > 19:50:55  User paging system operator
  5480.                          > 19:51:02  Entering sysop chat mode
  5481.                          > 20:05:41  Terminating sysop chat mode
  5482.                          > 20:18:32  User time expired, exiting door
  5483.  
  5484.                Note that the name of your door to be output to the logfile is
  5485.                taken from the od_program_name variable. If this variable is not
  5486.                set, OpenDoors will simply output "OpenDoors x.xx" as the program
  5487.                name.
  5488.  
  5489.                If a configuration file is to be used, the od_log_open() function
  5490.                should be called after calling the od_init_with_config()
  5491.                function. Thus, the approprate order in which to perform the
  5492.                various startup operations of your door are:
  5493.  
  5494.                          - Set OpenDoors registration variables
  5495.                          - Set the door's name
  5496.                          - Set default logfile name
  5497.                          - Call od_init_with_config(), if applicable
  5498.                          - Call od_log_open()
  5499.  
  5500.                After od_log_open() has been called, OpenDoors will automatically
  5501.                produce logfile entries for the following events:
  5502.  
  5503.  
  5504. OpenDoors Door Toolkit Manual - Version 4.10                       Page 89
  5505.  
  5506.  
  5507.  
  5508.  
  5509.                          - User paging sysop
  5510.                          - Beginnig of sysop chat
  5511.                          - Ending of sysop chat
  5512.                          - Sysop entering DOS shell
  5513.                          - Sysop returning frmo DOS shell
  5514.                          - User inactivity timeout
  5515.                          - User time expired
  5516.                          - Sysop dropping user back to BBS
  5517.                          - Sysop hanging up on user
  5518.                          - User hagning up on BBS
  5519.                          - Sysop locking out user
  5520.                          - Your door calling the od_exit()
  5521.                            function
  5522.  
  5523.                These built in log file entries can be customized by altering the
  5524.                value of the global array od_log_messages. The default definition
  5525.                for this array is as follows:
  5526.  
  5527.                char *od_log_messages[12]={"Carrier lost, exiting door",
  5528.                                           "System operator terminating call,
  5529.                                            exiting door",
  5530.                                           "User time expired, exiting door",
  5531.                                           "User keyboard inactivity, exiting
  5532.                                            door",
  5533.                                           "System operator returning user to
  5534.                                            BBS, exiting door",
  5535.                                           "Exiting door",
  5536.                                           "Invoking operating system shell",
  5537.                                           "Returning from operating system
  5538.                                            shell",
  5539.                                           "User paging system operator",
  5540.                                           "Entering sysop chat mode",
  5541.                                           "Terminating sysop chat mode",
  5542.                                           "%s entering door"};
  5543.  
  5544.  
  5545.                There is no od_log_close() function, as the logfile is
  5546.                automatically closed when your doors exits through the od_exit()
  5547.                function.
  5548.  
  5549.  
  5550. SEE ALSO       od_log_write(), od_init_with_config()
  5551.  
  5552.  
  5553.  
  5554.  
  5555.  
  5556.  
  5557.  
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563.  
  5564.  
  5565.  
  5566. OpenDoors Door Toolkit Manual - Version 4.10                       Page 90
  5567.  
  5568.  
  5569.  
  5570.  
  5571.  
  5572.  
  5573. OD_LOG_WRITE()
  5574. --------------------------------------------------------------------------------
  5575.  
  5576. PURPOSE        Function to write an entry to the log file
  5577.  
  5578.  
  5579. FORMAT         int od_log_write(char *message);
  5580.  
  5581.  
  5582. RETURNS        TRUE on success, or FALSE on failuer
  5583.  
  5584.  
  5585. DESCRIPTION    This function can be used to write entries to the log file. If
  5586.                the logfile has not already been opened when you call this
  5587.                function for the first time, OpenDoors will automatically open
  5588.                the log file at that time.
  5589.  
  5590.                To create an entry in the log file, simply call the
  5591.                od_log_write() function, passing to it the string of the text you
  5592.                wish to write. You should not include any control characters in
  5593.                this string, simply the text that should appear on the line.
  5594.                OpenDoors will automatically format the log file, adding the time
  5595.                information and other control characters. It is recommended that
  5596.                the length of the string passed to od_log_write() not exceed 67
  5597.                characters, in order that logfile lines will all be less than 80
  5598.                characters in length.
  5599.  
  5600.                Log file entries do not usually contain periods or other
  5601.                punctuation at the end of the line. Also, log file entries are
  5602.                usually written in the present tense. The first character of the
  5603.                entry is usually upper-case, with all other entries in lower
  5604.                case. Also, since excessive numbers or lengths of log file
  5605.                entries can quickly use a lot of disk space, it is best to think
  5606.                carefully about what events should be recorded in the log file.
  5607.                It is also a good idea to minimize the number of words used in
  5608.                the entry, without being too cryptic. As an example, "User
  5609.                entering options menu" should be used instead of "user entered
  5610.                the options menu."
  5611.  
  5612.  
  5613. SEE ALSO       od_log_open()
  5614.  
  5615.  
  5616. EXAMPLE        Calling the od_log_write() function is as simple as follows:
  5617.  
  5618.                          od_log_write("Awarding user with 5 minutes more time");
  5619.  
  5620.  
  5621.  
  5622.  
  5623.  
  5624.  
  5625.  
  5626.  
  5627.  
  5628. OpenDoors Door Toolkit Manual - Version 4.10                       Page 91
  5629.  
  5630.  
  5631.  
  5632.  
  5633.  
  5634.  
  5635. OD_PAGE()
  5636. --------------------------------------------------------------------------------
  5637.  
  5638. PURPOSE        Function to allow user to page the sysop
  5639.  
  5640.  
  5641. FORMAT         void od_page(void);
  5642.  
  5643.  
  5644. RETURNS        N/A
  5645.  
  5646.  
  5647. DESCRIPTION    This function can be called to allow the user to page the sysop.
  5648.                This function will ask the user why they wish to chat with the
  5649.                sysop, and then page the sysop. The sysop will then be free to
  5650.                break into chat at any time. Sysop paging will also be aborted by
  5651.                the user, simply by pressing [Enter] when asked for a reason for
  5652.                chat. When the user pages the sysop, the [Wants-Chat] indicator
  5653.                will begin to flash on the main status line, and the status line
  5654.                will switch to show the user's reason for wanting to chat. Also,
  5655.                the user's total number of pages will be incremented.
  5656.  
  5657.                Depending upon the setting of the od_control.od_okaytopage
  5658.                variable, this function will also optionally check sysop paging
  5659.                hours, and only allow the user to page the sysop during valid
  5660.                paging hours. For information on the variables containing the
  5661.                user's total number of pages, the user's want-chat status, valid
  5662.                sysop paging hours, and the od_control.od_okaytopage variable,
  5663.                see the section on the OpenDoors control structure, which begins
  5664.                on page 119.
  5665.  
  5666.  
  5667. EXAMPLE        For an example of the use of the od_page() function, see the
  5668.                EZVote example door, which is described beginning on page 25.
  5669.  
  5670.  
  5671.  
  5672.  
  5673.  
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.  
  5683.  
  5684.  
  5685.  
  5686.  
  5687.  
  5688.  
  5689.  
  5690. OpenDoors Door Toolkit Manual - Version 4.10                       Page 92
  5691.  
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698. OD_PRINTF()
  5699. --------------------------------------------------------------------------------
  5700.  
  5701. PURPOSE        Performs formatted output (remote & local)
  5702.  
  5703.  
  5704. FORMAT         void od_printf(char *format,...);
  5705.  
  5706.  
  5707. RETURNS        N/A
  5708.  
  5709.  
  5710. DESCRIPTION    This is one of two OpenDoors function which allows you to display
  5711.                a string of characters, the other being the od_disp_str()
  5712.                function. For a complete comparison of the various OpenDoors
  5713.                display function, see the description of the od_disp_str()
  5714.                function, on page 46. Like the od_disp_str() function, the
  5715.                od_printf() function will display its output both on the local
  5716.                screen, and on the remote user's screen (if the door is not
  5717.                operating in local mode). However, the od_printf() function also
  5718.                allows for formatted output, just as the printf() function does.
  5719.                In addition to providing all of the features of the normal C
  5720.                printf() function, the od_printf() function allows you to include
  5721.                codes to change the colour of the display of text. This unique
  5722.                feature allows you to display multi-coloured text, without having
  5723.                to use chains of alternating od_disp_str() and od_set_colour()
  5724.                calls.
  5725.  
  5726.                As with the printf() function, the od_printf() function accepts
  5727.                one or more parameters, the first parameter being the format
  5728.                string to be displayed, and the additional parameters being data
  5729.                to be displayed within the string. The OpenDoors od_printf()
  5730.                function recognizes all of the control characters and options
  5731.                recognized by the normal printf() function. For example, to
  5732.                display the amount of time that a user has left online, the
  5733.                following line would be a valid use of the od_printf() function:
  5734.  
  5735.                        od_printf("Time Left: %d\n\r",od_control.user_timelimit);
  5736.  
  5737.                Note that a full discussion of the printf() function is beyond
  5738.                the scope of this manual. For more information on using printf(),
  5739.                please see your Turbo C(++) / Borland C++ manuals.
  5740.  
  5741.                In addition to the normal control sequences, such as "%s", "%d",
  5742.                or "%12.12s", the od_printf() function also allows you to include
  5743.                special colour-setting codes within the format string. These
  5744.                colour code sequences BEGIN and END with a delimiter character,
  5745.                which is used to indicate that the sequence is a colour setting.
  5746.                Consider, for example, the following line of code, which displays
  5747.                text in various colours:
  5748.  
  5749.                        od_printf("`blue`Blue `green`Green `red`Red  \n\r");
  5750.  
  5751.  
  5752. OpenDoors Door Toolkit Manual - Version 4.10                       Page 93
  5753.  
  5754.  
  5755.  
  5756.  
  5757.                In this case (assuming of course that a colour monitor is being
  5758.                used) the word "Blue" will be displayed in the colour blue, the
  5759.                word "Green" will be displayed in the colour green, and the word
  5760.                "Red" will be displayed in the colour red. In this case, the
  5761.                sequence `blue` sets the display colour to dark blue on black.
  5762.                Here, the the back-quote (`) is the delimiter character which
  5763.                indicates the beginning and end of the colour sequence. Be sure
  5764.                not to confuse the back-quote character (`) with the normal
  5765.                forward quote ('). THIS IS THE MOST COMMON DIFFICULTY EXPERIENCED
  5766.                WITH THE OD_PRINTF() FUNCTION. The text between the back-quote
  5767.                characters indicates the colour that should be set. This text can
  5768.                include the name of the foreground colour, the name of the
  5769.                background colour, the "bright" keyword and the "flashing"
  5770.                keyword. The first colour mentioned is taken to be the foreground
  5771.                colour, and the second the background colour. Case is not
  5772.                sensitive, additional words can be included for legibility. Thus:
  5773.  
  5774.                          `bright white cyan`
  5775.  
  5776.                is equivalent to:
  5777.  
  5778.                          `Bright white on a cyan background`.
  5779.  
  5780.                The "bright" keyword indicates that the foreground colour should
  5781.                be displayed in high intensity, and the "flashing" keyword
  5782.                indicates that the text should be flashing. If no background is
  5783.                specified, the background colour defaults to black. If no
  5784.                foreground or background colours are specified, the colour
  5785.                defaults to white on black.
  5786.  
  5787.                The od_printf() function will automatically detect whether the
  5788.                user has ANSI or AVATAR graphics, and will send the appropriate
  5789.                colour codes to change the colour of displayed text. If the user
  5790.                does not have either ANSI or AVATAR graphics modes turned on,
  5791.                then the od_printf() function will not send any colour codes.
  5792.                Thus, a door program using colour codes would work just as well
  5793.                when ANSI or AVATAR graphics are not available, except that all
  5794.                text will appear in the same colour.
  5795.  
  5796.                You may prefer to set colours by using the od_set_colour() or
  5797.                od_set_attrib() functions, instead of using these cryptic colour
  5798.                codes imbedded in od_printf() functions. In some cases, however,
  5799.                it will be much more advantageous to place the colour codes
  5800.                within your od_printf() strings. As a case in point, consider the
  5801.                single od_printf() statement in the example, above. To accomplish
  5802.                the same result using the od_disp_str() and od_set_colour()
  5803.                functions, you would have to use the following SIX function
  5804.                calls:
  5805.  
  5806.                        od_set_colour(D_BLUE,D_BLACK);
  5807.                        od_disp_str("Blue ");
  5808.                        od_set_colour(D_GREEN,D_BLACK);
  5809.                        od_disp_str("Green ");
  5810.                        od_set_colour(D_RED,D_BLACK);
  5811.                        od_disp_str("Red  \n\r");
  5812.  
  5813.  
  5814. OpenDoors Door Toolkit Manual - Version 4.10                       Page 94
  5815.  
  5816.  
  5817.  
  5818.  
  5819.                While this method MAY be easier understand, it certainly requires
  5820.                many more line of code to accomplish. However, either method will
  5821.                work, and the choice is up to you as to which method you prefer.
  5822.                Keep in mind, however, that if the colour to be set is stored in
  5823.                a variable, instead of always being the same colour, you must use
  5824.                either the od_set_colour() or od_set_attrib() function to set the
  5825.                display colour.
  5826.  
  5827.                While the back-quote (`) character is normally used to delimit a
  5828.                colour sequence in the od_printf() function, you may wish to be
  5829.                able to print a back-quote character using the od_printf()
  5830.                function. In this case, you may configure OpenDoors to use a
  5831.                different character to represent colour code sequences. To do
  5832.                this, simply use the od_control.od_colour_delimiter variable,
  5833.                which is described in the OpenDoors control structure section,
  5834.                beginning on page 119. For example, if you wished to use the
  5835.                tilde (~) character instead of the back-quote character to change
  5836.                colours, simply place the following line within your program, at
  5837.                some point after having called od_init() or some OpenDoors door
  5838.                driver function:
  5839.  
  5840.                        od_control.od_colour_delimiter='~';
  5841.  
  5842.                Also, you may disable the colour code interpretation within the
  5843.                od_printf() function altogether, by setting the
  5844.                od_control.od_colour_delimiter variable to 0.
  5845.  
  5846.                Note that the od_printf() function interprets the colour codes
  5847.                AFTER parsing the other control sequences, such as "%d" or "%s".
  5848.                Thus, if you used the command:
  5849.  
  5850.                        od_printf("%s",string);
  5851.  
  5852.                Any colour codes contained in the string "string" would also be
  5853.                interpreted. If you did not wish to have any colour code
  5854.                characters which might be contained in the string "string"
  5855.                treated as such, you could again disable od_printf()'s colour
  5856.                code interpretation, by setting the od_control.od_colour_char
  5857.                variable to 0.
  5858.  
  5859.  
  5860. SEE ALSO       od_disp_str(), od_disp(), od_putch(), od_repeat(), od_emulate()
  5861.  
  5862.  
  5863. EXAMPLE        Below is a simple example of a user statistics door program,
  5864.                which displays various pieces of information to the user, by
  5865.                using the od_printf() function. Notice the use of colour code
  5866.                sequences in order to display the titles in a different colour
  5867.                from the information fields. Note that since the information
  5868.                available to this door will depend on the BBS system under which
  5869.                it is running, not all of the information displayed by this door
  5870.                will be available under all BBS systems. For a description of
  5871.                what information is available under what BBS systems, see the
  5872.                OpenDoors control structure portion of this manual, which begins
  5873.                on page 119.
  5874.  
  5875.  
  5876. OpenDoors Door Toolkit Manual - Version 4.10                       Page 95
  5877.  
  5878.  
  5879.  
  5880.  
  5881.  
  5882. #include "opendoor.h"
  5883.  
  5884. int main(int argc,char *argv[])
  5885.    {
  5886.    od_init();                                      /* Begin OpenDoors program */
  5887.  
  5888.    od_printf("`bright white` YOUR STATISTICS\n\r");          /* Display title */
  5889.    od_printf("---------------\n\r\n\r");
  5890.  
  5891.                                                         /* Display statistics */
  5892.    od_printf("`red`NAME :              `blue`%s\n\r",od_control.user_logintime);
  5893.    od_printf("`red`LOCATION :          `blue`%s\n\r",od_control.user_location);
  5894.    od_printf("`red`PHONE NUMBER :      `blue`%s\n\r",od_control.user_homephone);
  5895.    od_printf("`red`LAST CALL :         `blue`%s\n\r",od_control.user_lastdate);
  5896.    od_printf("`red`NUMBER OF CALLS :   `blue`%u\n\r",od_control.user_numcalls);
  5897.    od_printf("`red`NUMBER OF PAGES :   `blue`%u\n\r",od_control.user_numpages);
  5898.    od_printf("`red`REMAINING TIME :    `blue`%d\n\r",od_control.user_timelimit);
  5899.    od_printf("`red`# OF DOWNLOADS :    `blue`%u\n\r",od_control.user_downloads);
  5900.    od_printf("`red`# OF UPLOADS :      `blue`%u\n\r",od_control.user_uploads);
  5901.    od_printf("`red`KBYTES DL TODAY :   `blue`%u\n\r",od_control.user_todayk);
  5902.  
  5903.                                                  /* Ask user to press [Enter] */
  5904.    od_printf("`bright green on green`Press [Enter] to return to BBS...\n\r");
  5905.  
  5906.    while(od_get_key(TRUE)!=13);             /* Wait for user to press [Enter] */
  5907.  
  5908.    od_exit(20,FALSE);                                        /* Return to BBS */
  5909.    }
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938. OpenDoors Door Toolkit Manual - Version 4.10                       Page 96
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946. OD_PUTCH()
  5947. --------------------------------------------------------------------------------
  5948.  
  5949. PURPOSE        Function to display a single character.
  5950.  
  5951.  
  5952. FORMAT         void od_putch(int character);
  5953.  
  5954.  
  5955. RETURNS        N/A
  5956.  
  5957.  
  5958. DESCRIPTION    This function performs a similar function to the other OpenDoors
  5959.                display functions. For information on the uses of the various
  5960.                OpenDoors display functions, see the description of the
  5961.                od_disp_str() function, on page 46. This function is most similar
  5962.                to the od_disp() and od_disp_str() functions, except that it only
  5963.                displays a single character at a time.
  5964.  
  5965.                This function will display the character passed to it at the
  5966.                cursor position in the output window, and then advance the cursor
  5967.                to the next display position. If OpenDoors is not operating in
  5968.                local mode, the character will also be sent to the modem, and
  5969.                thus displayed on the user's screen in the same manner that it is
  5970.                displayed on the local screen. If either ANSI or AVATAR graphics
  5971.                mode is activated the character will be displayed in the current
  5972.                colour.
  5973.  
  5974.  
  5975. SEE ALSO       od_disp_str(), od_disp(), od_printf(), od_repeat(), od_emulate()
  5976.  
  5977.  
  5978. EXAMPLE        Below is an example of the use of the od_putch() function. This
  5979.                example is a function which you could use in place of the
  5980.                od_get_key() function. This function inputs a single character
  5981.                from the keyboard, just as the od_get_key() function does.
  5982.                However, if the character entered is a printable character, the
  5983.                function will also echo the character to the local screen, using
  5984.                the od_putch() function. This is helpful for a user to know what
  5985.                key they have pressed within your door.
  5986.  
  5987.                char get_key_with_echo(int wait)
  5988.                   {
  5989.                   char pressed=od_get_key(wait);         /* Get key from user */
  5990.  
  5991.                   if(pressed>=32 && pressed<=126)      /* If key is printable */
  5992.                      {
  5993.                      od_putch(pressed);              /* Display the character */
  5994.                      }
  5995.  
  5996.                   return(pressed);              /* Return key pressed by user */
  5997.                   }
  5998.  
  5999.  
  6000. OpenDoors Door Toolkit Manual - Version 4.10                       Page 97
  6001.  
  6002.  
  6003.  
  6004.  
  6005.                For a further example of the user of the od_putch() function, see
  6006.                the example accompanying the od_repeat() function, which is
  6007.                described on page 99.
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.  
  6015.  
  6016.  
  6017.  
  6018.  
  6019.  
  6020.  
  6021.  
  6022.  
  6023.  
  6024.  
  6025.  
  6026.  
  6027.  
  6028.  
  6029.  
  6030.  
  6031.  
  6032.  
  6033.  
  6034.  
  6035.  
  6036.  
  6037.  
  6038.  
  6039.  
  6040.  
  6041.  
  6042.  
  6043.  
  6044.  
  6045.  
  6046.  
  6047.  
  6048.  
  6049.  
  6050.  
  6051.  
  6052.  
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062. OpenDoors Door Toolkit Manual - Version 4.10                       Page 98
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070. OD_REPEAT()
  6071. --------------------------------------------------------------------------------
  6072.  
  6073. PURPOSE        Repeatedly display the specified character any number of times,
  6074.                using special graphics codes for greater speed, if possible.
  6075.  
  6076.  
  6077. FORMAT         void od_repeat(char value,unsigned char times);
  6078.  
  6079.  
  6080. RETURNS        N/A
  6081.  
  6082.  
  6083. DESCRIPTION    This display function will repeatedly display the character
  6084.                "value", "times" times. For a complete breakdown of the various
  6085.                OpenDoors display functions, see the description of the
  6086.                od_disp_str() function, located on page 46.
  6087.  
  6088.                The advantage of using this function to display a series of
  6089.                identical characters is that this function will use special
  6090.                graphics-mode control sequences to display the repeated character
  6091.                very efficiently, if the required graphics mode is available. For
  6092.                example, in AVATAR mode, this function can display an entire line
  6093.                of one character, by sending a control sequence to the modem that
  6094.                is only three characters long. If graphics mode is not turned on,
  6095.                then the od_disp_str() function will simply send the specified
  6096.                character the appropriate number of times. As with the other
  6097.                display functions, the output of this function is sent to both
  6098.                the local and remote screens.
  6099.  
  6100.  
  6101. SEE ALSO       od_putch(), od_disp_str(), od_disp(), od_printf(), od_emulate()
  6102.  
  6103.  
  6104. EXAMPLE        The example function below demonstrates the use of the
  6105.                od_repeat() function in drawing a window (a square box) on the
  6106.                screen. This function is essentially a simplified version of the
  6107.                od_draw_box() function, which is described on page 48. Unlike
  6108.                this function, the od_draw_box() function allows the
  6109.                customization of the characters used to draw the box's boarder,
  6110.                and if possible uses additional AVATAR graphics codes to display
  6111.                the window even faster than this function does. Thus, the
  6112.                function below is really provided for demonstration purposes
  6113.                only.
  6114.  
  6115.                This function accepts four parameters, which indicate the
  6116.                location of the upper left and lower right corners of the window
  6117.                to be displayed. The function then displays the window with the
  6118.                current colour attribute settings. Since this function uses the
  6119.                od_repeat() function, if AVATAR graphics are available, it can
  6120.                display the entire window in a fraction of a second, even if it
  6121.                is displaying a window the size of the entire screen at slow baud
  6122.  
  6123.  
  6124. OpenDoors Door Toolkit Manual - Version 4.10                       Page 99
  6125.  
  6126.  
  6127.  
  6128.                rates. Note that this window displaying function requires that
  6129.                the user has either ANSI or AVATAR graphics mode activated.
  6130.  
  6131.                void draw_window(char left, char top, char right, char bottom)
  6132.                   {
  6133.                   char line_counter;    /* Number of current line being drawn */
  6134.                   char between_size=(right-left)-1;       /* X size of window */
  6135.  
  6136.                   od_set_cursor(top,left);              /* move to top corner */
  6137.                   od_putch(218);                  /* display corner character */
  6138.                   od_repeat(196,between_size);            /* display top line */
  6139.                   od_putch(191);                  /* display corner character */
  6140.                                        /* loop through middle lines of window */
  6141.                   for(line_counter=top+1;line_counter<bottom;++line_counter)
  6142.                      {
  6143.                      od_set_cursor(line_counter,left);  /* move to line start */
  6144.                      od_putch(179);                 /* display left line char */
  6145.                      od_repeat(' ',between_size);       /* display blank area */
  6146.                      od_putch(179);                /* display right line char */
  6147.                      }
  6148.  
  6149.                   od_set_cursor(bottom,left);        /* move to bottom corner */
  6150.                   od_putch(192);                  /* display corner character */
  6151.                   od_repeat(196,between_size);         /* display bottom line */
  6152.                   od_putch(217);                  /* display corner character */
  6153.                   }
  6154.  
  6155.  
  6156.  
  6157.  
  6158.  
  6159.  
  6160.  
  6161.  
  6162.  
  6163.  
  6164.  
  6165.  
  6166.  
  6167.  
  6168.  
  6169.  
  6170.  
  6171.  
  6172.  
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186. OpenDoors Door Toolkit Manual - Version 4.10                       Page 100
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194. OD_SEND_FILE()
  6195. --------------------------------------------------------------------------------
  6196.  
  6197. PURPOSE        Sends an ASCII/ANSI/AVATAR file from the disk, using terminal
  6198.                emulation. Also interprets RA/QBBS style information control
  6199.                codes.
  6200.  
  6201.  
  6202. FORMAT         int od_send_file(char *filename);
  6203.  
  6204.  
  6205. RETURNS        TRUE if the file was successfully sent
  6206.                FALSE if OpenDoors was unable to send the file
  6207.  
  6208.  
  6209. DESCRIPTION:   This powerful function will display any ASCII, ANSI or AVATAR
  6210.                text file. The od_send_file() function can be used to display
  6211.                existing BBS text files, such as GOODBYE.A?? before your door
  6212.                hangs up on the user. You can also make use of the od_send_file()
  6213.                function to build many of your door screens as external files.
  6214.                This will allow you to easily create these screens in an ANSI
  6215.                editor program, such as "TheDraw". It will could also optionally
  6216.                allow sysops to customize your door for use on their own BBS.
  6217.  
  6218.                The od_send_file() function is called with the full path and
  6219.                filename of the file you wish to have displayed. Thus, if you
  6220.                wished to send the ANSI file MAINMENU.SCR, you would simply call:
  6221.  
  6222.                             od_send_file("MAINMENU.SCR");
  6223.  
  6224.                In many cases, instead of having just one file that you want
  6225.                displayed in particular, you will have several different files,
  6226.                and will want a different one displayed according to the user's
  6227.                graphics mode. For example, you might have the three files,
  6228.                MAINMENU.ASC, MAINMENU.ANS and MAINMENU.AVT; the .ASC file
  6229.                containing no graphics control codes, the .ANS file containing
  6230.                ANSI graphics control codes, and the .AVT file containing AVATAR
  6231.                graphics control codes. In this case, you can have the
  6232.                od_send_file() function automatically select the appropriate file
  6233.                according to the user's current display mode, by omitting the
  6234.                extension altogether. Thus, a call to:
  6235.  
  6236.                             od_send_file("MAINMENU");
  6237.  
  6238.                would cause OpenDoors to automatically send the appropriate file,
  6239.                according to the user's graphics mode settings. When the
  6240.                od_send_file() function is used in this "automatic mode" (where
  6241.                you do not specify a filename extension), it will look for one of
  6242.                the three filename extensions listed on the following page.
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248. OpenDoors Door Toolkit Manual - Version 4.10                       Page 101
  6249.  
  6250.  
  6251.  
  6252.  
  6253.                +----------------------------------------------------------+
  6254.                | Extension| File type                                     |
  6255.                +----------+-----------------------------------------------|
  6256.                |   .ASC   | Does not require any graphics mode to display |
  6257.                |   .ANS   | Requires ANSI graphics mode to display        |
  6258.                |   .AVT   | Requires AVATAR graphics mode to display      |
  6259.                +----------------------------------------------------------+
  6260.  
  6261.  
  6262.                Thus, if the user has AVATAR graphics enabled, od_send_file()
  6263.                will first search for the .AVT file. If no file exists with the
  6264.                specified filename and a .AVT extension, od_send_file() will then
  6265.                search for a .ANS, and if not found .ASC. If the user has only
  6266.                ANSI graphics enabled, od_send_file() will attempt first to
  6267.                display the .ANS file, and if not found will search for .ASC. In
  6268.                the case that the user is using plain-ASCII mode, this function
  6269.                will attempt only to display the .ASC file.
  6270.  
  6271.                The od_send_file() will send any ANSI or AVATAR codes in the file
  6272.                directly to the remote terminal, and interpret them to display on
  6273.                the sysop's local screen (regardless of the actual filename
  6274.                extension). This interpretation is accomplished by OpenDoor's
  6275.                built in terminal emulator. The terminal emulator fully supports
  6276.                all ANSI and AVATAR level 0 and level 0+ control codes. The
  6277.                terminal emulator will also translate Apex/Remote Access/QuickBBS
  6278.                style control codes. The control codes supported by OpenDoors are
  6279.                listed in the chart on the following pages. When these control
  6280.                codes are inserted into the file, OpenDoors will replace them
  6281.                with various pieces of user or system information.
  6282.  
  6283.  
  6284.  
  6285.  
  6286.  
  6287.  
  6288.  
  6289.  
  6290.  
  6291.  
  6292.  
  6293.  
  6294.  
  6295.  
  6296.  
  6297.  
  6298.  
  6299.  
  6300.  
  6301.  
  6302.  
  6303.  
  6304.  
  6305.  
  6306.  
  6307.  
  6308.  
  6309.  
  6310. OpenDoors Door Toolkit Manual - Version 4.10                       Page 102
  6311.  
  6312.  
  6313.  
  6314.  
  6315.  
  6316.  
  6317.  
  6318.                  +-----------------------------------------------------+
  6319.                  | CONTROL | ASCII |                                   |
  6320.                  |  CODE   | VALUE | DESCRIPTION                       |
  6321.                  +---------+-------+-----------------------------------|
  6322.                  |   ^FA   | 06,65 | Displays the user's full name     |
  6323.                  |   ^FB   | 06,66 | Location the user is calling from |
  6324.                  |   ^FC   | 06,67 | Displays the user's password      |
  6325.                  |   ^FD   | 06,68 | Business/data phone number        |
  6326.                  |   ^FE   | 06,69 | Home/voice phone number           |
  6327.                  |   ^FF   | 06,70 | Date of the user's last call      |
  6328.                  |   ^FG   | 06,71 | Time of day of the last call      |
  6329.                  |   ^FH   | 06,72 | The user's `A' flags settings     |
  6330.                  |   ^FI   | 06,73 | The user's `B' flags settings     |
  6331.                  |   ^FJ   | 06,74 | The user's `C' flags settings     |
  6332.                  |   ^FK   | 06,75 | The user's `D' flags settings     |
  6333.                  |   ^FL   | 06,76 | User's remaining netmail credit   |
  6334.                  |   ^FM   | 06,77 | Number of messages posted by user |
  6335.                  |   ^FN   | 06,78 | Last read message number by user  |
  6336.                  |   ^FO   | 06,79 | Displays security level of user   |
  6337.                  |   ^FP   | 06,80 | Number of times user has called   |
  6338.                  |   ^FQ   | 06,81 | Total # of uploads by user        |
  6339.                  |   ^FR   | 06,82 | Total KBytes uploaded by user     |
  6340.                  |   ^FS   | 06,83 | Total # of downloads by user      |
  6341.                  |   ^FT   | 06,84 | Total Kbytes downloaded by user   |
  6342.                  |   ^FU   | 06,85 | # of minute user has used today   |
  6343.                  |   ^FV   | 06,86 | User's screen length setting      |
  6344.                  |   ^FW   | 06,87 | User's first name only            |
  6345.                  |   ^FX   | 06,88 | User's ANSI setting               |
  6346.                  |   ^FY   | 06,89 | User's "continue?" prompt setting |
  6347.                  |   ^FZ   | 06,90 | Does user have screen clearing on |
  6348.                  |   ^F0   | 06,48 | User's Full-screen editor setting |
  6349.                  |   ^F1   | 06,49 | User's Quiet mode setting         |
  6350.                  |   ^F2   | 06,50 | User's hot-keys setting           |
  6351.                  |   ^F3   | 06,51 | Displays the user's alias         |
  6352.                  |   ^F4   | 06,52 | The date of the User's first call |
  6353.                  |   ^F5   | 06,53 | The user's date of birth          |
  6354.                  |   ^F6   | 06,54 | User's subscription expiry date   |
  6355.                  |   ^F7   | 06,55 | Number of days until expiry       |
  6356.                  |   ^F8   | 06,56 | User's AVATAR setting             |
  6357.                  |   ^F9   | 06,57 | The user's upload:download ratio  |
  6358.                  |   ^F:   | 06,58 | User's Upload K:download K ratio  |
  6359.                  +-----------------------------------------------------+
  6360.  
  6361.  
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369.  
  6370.  
  6371.  
  6372. OpenDoors Door Toolkit Manual - Version 4.10                       Page 103
  6373.  
  6374.  
  6375.  
  6376.  
  6377.  
  6378.  
  6379.  
  6380.                  +-----------------------------------------------------+
  6381.                  | CONTROL | ASCII |                                   |
  6382.                  |  CODE   | VALUE | DESCRIPTION                       |
  6383.                  +---------+-------+-----------------------------------|
  6384.                  |   ^F;   | 06,59 | Full-screen message reader        |
  6385.                  |   ^KA   | 11,65 | Total # of calls BBS has received |
  6386.                  |   ^KB   | 11,66 | Name of the last caller to BBS    |
  6387.                  |   ^KC   | 11,67 | Total # of active messages on BBS |
  6388.                  |   ^KD   | 11,68 | Displays # of the first message   |
  6389.                  |   ^KE   | 11,69 | Displays # of the last message    |
  6390.                  |   ^KF   | 11,70 | # of times user has paged sysop   |
  6391.                  |   ^KG   | 11,71 | Full name of the current weekday  |
  6392.                  |   ^KH   | 11,72 | Displays total number of users    |
  6393.                  |   ^KI   | 11,73 | Displays the current time         |
  6394.                  |   ^KJ   | 11,74 | Displays the current date         |
  6395.                  |   ^KK   | 11,75 | Minutes the user has been online  |
  6396.                  |   ^KL   | 11,76 | Seconds the user has been online  |
  6397.                  |   ^KM   | 11,77 | Minutes the user has used today   |
  6398.                  |   ^KN   | 11,78 | Seconds the user has used today   |
  6399.                  |   ^KO   | 11,79 | Minutes remaining for user today  |
  6400.                  |   ^KP   | 11,80 | Seconds remaining for user today  |
  6401.                  |   ^KQ   | 11,81 | The user's daily time limit       |
  6402.                  |   ^KR   | 11,82 | Displays the current baud rate    |
  6403.                  |   ^KS   | 11,83 | The current weekday in short-form |
  6404.                  |   ^KT   | 11,84 | The user's daily download limit   |
  6405.                  |   ^KU   | 11,85 | # of minutes until the next event |
  6406.                  |   ^KV   | 11,86 | Time of the next system event     |
  6407.                  |   ^KW   | 11,87 | # of node user is currently on    |
  6408.                  |   ^KX   | 11,88 | Disconnects the user              |
  6409.                  +-----------------------------------------------------+
  6410.  
  6411.  
  6412. SEE ALSO       od_emulate(), od_list_files(), od_hotkey_menu()
  6413.  
  6414.  
  6415. EXAMPLE        For an example of the use of the od_send_file() function in
  6416.                displaying a custom door menu, see the EZVote example door, which
  6417.                is described beginning on page 25.
  6418.  
  6419.  
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425.  
  6426.  
  6427.  
  6428.  
  6429.  
  6430.  
  6431.  
  6432.  
  6433.  
  6434. OpenDoors Door Toolkit Manual - Version 4.10                       Page 104
  6435.  
  6436.  
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442. OD_SET_ATTRIB()
  6443. --------------------------------------------------------------------------------
  6444.  
  6445. PURPOSE        Function to change the text colour in ANSI or AVATAR mode, using
  6446.                a single IBM-PC colour attribute value.
  6447.  
  6448.  
  6449. FORMAT         void od_set_attrib(int colour);
  6450.  
  6451.  
  6452. RETURNS        N/A
  6453.  
  6454.  
  6455. DESCRIPTION    od_set_attrib() is one of two functions which change the colour
  6456.                of the currently displayed text. This function allows you to set
  6457.                the text colour using a single IBM-PC style colour attribute. On
  6458.                the other hand, the od_set_colour() function allows you to set
  6459.                the display colour by specifying a foreground and background text
  6460.                colour. Generally speaking, which of these two functions you use
  6461.                will be only a matter of personal preference. You will, however,
  6462.                most likely find it more convenient to use the od_set_colour()
  6463.                function for changing display colour. However the od_set_attrib()
  6464.                offers the advantage of allowing you to manipulate the colour to
  6465.                be displayed as a single value, instead of two separate values.
  6466.                This could be convenient, for example, when displaying text in a
  6467.                user configured colour. Using a single byte to represent the
  6468.                colour will likely be easier than using two. An alternative
  6469.                method of setting the colour of displayed text is to include the
  6470.                colour codes within a string displayed by the od_printf()
  6471.                function. The benefits of doing this, along with instructions on
  6472.                how to do this, are described in the section on the od_printf()
  6473.                function, which begins on page 93.
  6474.  
  6475.                This function will only have an effect if the user has ANSI or
  6476.                AVATAR mode turned on. As a result, you can use this function
  6477.                within your door program, and have your text automatically
  6478.                displayed in multiple colours if graphics mode is available, and
  6479.                displayed without colours if graphics mode is not available.
  6480.  
  6481.                Note that the colour to be set is passed to this function as an
  6482.                IBM-style screen attribute. Hence, you can set the colour of text
  6483.                to be displayed by a single hexidecimal value, encoded as
  6484.                follows:
  6485.  
  6486.                               +------------- Background colour
  6487.                               |
  6488.                             0x7f
  6489.                                |
  6490.                                +------------ Foreground colour
  6491.  
  6492.                Where the left digit (most significant nibble) of the hexidecimal
  6493.                number represents the background colour, and the right digit
  6494.  
  6495.  
  6496. OpenDoors Door Toolkit Manual - Version 4.10                       Page 105
  6497.  
  6498.  
  6499.  
  6500.                (least significant nibble) represents the foreground colour. Each
  6501.                of the possible colours, along with their corresponding
  6502.                hexidecimal values, are listed in the charts, below.
  6503.  
  6504.                +-----------------------+  +--------------------------+
  6505.                |   Foreground colours  |  |   Background  | Flashing |
  6506.                +-----------------------|  +---------------+----------|
  6507.                |  0  | Black           |  |  0  | Black   |   Off    |
  6508.                |  1  | Blue            |  |  1  | Blue    |   Off    |
  6509.                |  2  | Green           |  |  2  | Green   |   Off    |
  6510.                |  3  | Cyan            |  |  3  | Cyan    |   Off    |
  6511.                |  4  | Red             |  |  4  | Red     |   Off    |
  6512.                |  5  | Magenta         |  |  5  | Magenta |   Off    |
  6513.                |  6  | Brown           |  |  6  | Brown   |   Off    |
  6514.                |  7  | White (grey)    |  |  7  | White   |   Off    |
  6515.                |  8  | Bright Black    |  |  8  | Black   |    On    |
  6516.                |  9  | Bright Blue     |  |  9  | Blue    |    On    |
  6517.                |  a  | Bright Green    |  |  a  | Green   |    On    |
  6518.                |  b  | Bright Cyan     |  |  b  | Cyan    |    On    |
  6519.                |  c  | Bright Red      |  |  c  | Red     |    On    |
  6520.                |  d  | Bright Magenta  |  |  d  | Magenta |    On    |
  6521.                |  e  | Yellow          |  |  e  | Brown   |    On    |
  6522.                |  f  | White (bright)  |  |  f  | White   |    On    |
  6523.                +-----------------------+  +--------------------------+
  6524.  
  6525.                Hence, od_set_attrib(0x0e) would set the display colour to yellow
  6526.                on a black background, and od_set_attrib(0x70) would set the
  6527.                display colour to black on a while background.
  6528.  
  6529.  
  6530. SEE ALSO       od_set_colour(), od_emulate(), od_clr_scr(), od_clr_line(),
  6531.                od_set_cursor()
  6532.  
  6533.  
  6534. EXAMPLE        At times, you may wish to allow the user to select the colour of
  6535.                text they wish to have displayed, perhaps to configure your door
  6536.                for the ideal colours to be displayed on their system. To
  6537.                demonstrate the use of the od_set_attrib() function, we show
  6538.                another function, which shows the user all 256 possible colours
  6539.                that can be displayed, and allows the user to choose which colour
  6540.                they prefer. The function will then return the colour attribute
  6541.                value of the user's chosen colour, which can later be passed to
  6542.                od_set_attrib() to set the displayed text colour to the colour
  6543.                which was chosen by the user.
  6544.  
  6545.                unsigned char choose_colour(void)
  6546.                   {
  6547.                   register unsigned char counter;   /* for displaying colours */
  6548.                   char string[4];                     /* string input by user */
  6549.  
  6550.                   od_set_attrib(0x07);                       /* display title */
  6551.                   od_disp_str("Available colours:\n\r\n\r");
  6552.  
  6553.                   for(counter=0;counter<=255;)    /* loop through all colours */
  6554.                      {
  6555.                      od_set_attrib(counter);        /* set appropriate colour */
  6556.  
  6557.  
  6558. OpenDoors Door Toolkit Manual - Version 4.10                       Page 106
  6559.  
  6560.  
  6561.  
  6562.                      od_printf("%03.3u",counter);  /* display colour's number */
  6563.                      if(((++counter)%16)==0)    /* after every 16 colours ... */
  6564.                         {
  6565.                         od_set_attrib(0x07);  /* ... reset display colour ... */
  6566.                         od_disp_str("\n\r");      /* ... and start a new line */
  6567.                         }
  6568.                      }
  6569.  
  6570.                   od_set_attrib(0x07);         /* Allow user to choose colour */
  6571.                   od_disp_str("Which colour do you prefer : ");
  6572.                   od_input_str(string,3,'0','9');
  6573.                   return(atoi(string));               /* Return chosen colour */
  6574.                   }
  6575.  
  6576.  
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.  
  6608.  
  6609.  
  6610.  
  6611.  
  6612.  
  6613.  
  6614.  
  6615.  
  6616.  
  6617.  
  6618.  
  6619.  
  6620. OpenDoors Door Toolkit Manual - Version 4.10                       Page 107
  6621.  
  6622.  
  6623.  
  6624.  
  6625.  
  6626.  
  6627.  
  6628. OD_SET_COLOUR()
  6629. --------------------------------------------------------------------------------
  6630.  
  6631. PURPOSE        Function to change the text colour in ANSI or AVATAR mode, using
  6632.                foreground and background colour values.
  6633.  
  6634.  
  6635. FORMAT         void od_set_colour(int foreground, int background);
  6636.  
  6637.  
  6638. RETURNS        N/A
  6639.  
  6640.  
  6641. DESCRIPTION    od_set_colour() is one of two functions which change the colour
  6642.                of the currently displayed text. This function allows you to set
  6643.                the text colour using separate foreground an background text
  6644.                colours, whereas od_set_attrib() allows you to set the text
  6645.                colour using a single IBM-PC style colour attribute. Generally
  6646.                speaking, which of these two functions you use is only a matter
  6647.                of personal preference. An alternative method of setting the
  6648.                colour of displayed text is to include the colour codes within a
  6649.                string displayed by the od_printf() function. The benefits of
  6650.                doing this, along with instructions on how to do this, are
  6651.                described in the section on the od_printf() function, which
  6652.                begins on page 93.
  6653.  
  6654.                This function will only have an effect if the user has ANSI or
  6655.                AVATAR mode turned on. As a result, you can use this function
  6656.                within your door program, and have your text automatically
  6657.                displayed in multiple colours if graphics mode is available, and
  6658.                displayed without colours if graphics mode is not available.
  6659.  
  6660.                The od_set_colour() function accepts two parameters, the first
  6661.                parameter being the foreground colour to be used in displaying
  6662.                text, and the second parameter being the background colour to be
  6663.                used in displaying text. For example,
  6664.  
  6665.                                od_set_colour(L_WHITE,D_BLACK);
  6666.  
  6667.                would set the current colour to Light White on Dark Black. The
  6668.                foreground and background text colours can be any one of the
  6669.                colour values listed on the following page.
  6670.  
  6671.  
  6672.  
  6673.  
  6674.  
  6675.  
  6676.  
  6677.  
  6678.  
  6679.  
  6680.  
  6681.  
  6682. OpenDoors Door Toolkit Manual - Version 4.10                       Page 108
  6683.  
  6684.  
  6685.  
  6686.  
  6687.  
  6688.                +-------------------+-----------+
  6689.                | Foreground Colour | Value     |
  6690.                +-------------------+-----------+
  6691.                | Dark Black        | D_BLACK   |
  6692.                | Dark Blue         | D_BLUE    |
  6693.                | Dark Green        | D_GREEN   |
  6694.                | Dark Cyan         | D_CYAN    |
  6695.                | Dark Red          | D_RED     |
  6696.                | Dark Magenta      | D_MAGENTA |
  6697.                | Dark Brown        | D_BROWN   |
  6698.                | Grey (Dark White) | D_GREY    |
  6699.                | Light Black (Grey)| L_BLACK   |
  6700.                | Light Blue        | L_BLUE    |
  6701.                | Light Green       | L_GREEN   |
  6702.                | Light Cyan        | L_CYAN    |
  6703.                | Light Red         | L_RED     |
  6704.                | Light Magenta     | L_MAGENTA |
  6705.                | Yellow            | L_YELLOW  |
  6706.                | White             | L_WHITE   |
  6707.                +-------------------+-----------+
  6708.  
  6709.  
  6710.                +-------------------+-----------+
  6711.                | Background Colour | Value     |
  6712.                +-------------------+-----------+
  6713.                | Black             | D_BLACK   |
  6714.                | Blue              | D_BLUE    |
  6715.                | Green             | D_GREEN   |
  6716.                | Cyan              | D_CYAN    |
  6717.                | Red               | D_RED     |
  6718.                | Magenta           | D_MAGENTA |
  6719.                | Brown             | D_BROWN   |
  6720.                | Grey              | D_GREY    |
  6721.                | Blinking Black    | B_BLACK   |
  6722.                | Blinking Blue     | B_BLUE    |
  6723.                | Blinking Green    | B_GREEN   |
  6724.                | Blinking Cyan     | B_CYAN    |
  6725.                | Blinking Red      | B_RED     |
  6726.                | Blinking Magenta  | B_MAGENTA |
  6727.                | Blinking Brown    | B_BROWN   |
  6728.                | Blinking Grey     | B_WHITE   |
  6729.                +-------------------+-----------+
  6730.  
  6731.  
  6732. SEE ALSO       od_set_attrib(), od_emulate(), od_clr_scr(), od_clr_line(),
  6733.                od_set_cursor()
  6734.  
  6735. EXAMPLE        As an example of using the od_set_colour() function to set the
  6736.                colour of displayed text, we show a pair of two functions. These
  6737.                functions will allow a program to set the foreground OR
  6738.                background colour of text, without setting the other. In
  6739.                contrast, the od_set_colour() function sets both the foreground
  6740.                and background colour at the same time. These function presume
  6741.                that they are the only functions used within the door to set the
  6742.  
  6743.  
  6744. OpenDoors Door Toolkit Manual - Version 4.10                       Page 109
  6745.  
  6746.  
  6747.  
  6748.                colour of displayed text, and that the original text colour prior
  6749.                to calling either of these functions is dark white on black.
  6750.                These function must also have access to the two global variables
  6751.                "current_foreground" and "current_background", as defined below.
  6752.  
  6753.  
  6754.                   void set_foreground(char foreground);
  6755.                   void set_background(char background);
  6756.                unsigned char current_foreground=D_BLACK;
  6757.                unsigned char current_background=D_GREY;
  6758.  
  6759.                void set_foreground(char foreground)
  6760.                   {                                    /* set new text colour */
  6761.                   od_set_colour(foreground,current_background);
  6762.                   current_foreground=foreground;       /* save new foreground */
  6763.                   }
  6764.  
  6765.                void set_background(char background)
  6766.                   {                                    /* set new text colour */
  6767.                   od_set_colour(current_foreground,background);
  6768.                   current_background=background;       /* save new background */
  6769.                   }
  6770.  
  6771.  
  6772.                Using these functions, you would then be able to set just the
  6773.                foreground text colour by a function call like:
  6774.  
  6775.                          set_foreground(L_YELLOW);
  6776.  
  6777.                Or set just the background text colour by a function call like:
  6778.  
  6779.                          set_background(D_GREY);
  6780.  
  6781.  
  6782.  
  6783.  
  6784.  
  6785.  
  6786.  
  6787.  
  6788.  
  6789.  
  6790.  
  6791.  
  6792.  
  6793.  
  6794.  
  6795.  
  6796.  
  6797.  
  6798.  
  6799.  
  6800.  
  6801.  
  6802.  
  6803.  
  6804.  
  6805.  
  6806. OpenDoors Door Toolkit Manual - Version 4.10                       Page 110
  6807.  
  6808.  
  6809.  
  6810.  
  6811.  
  6812.  
  6813.  
  6814. OD_SET_CURSOR()
  6815. --------------------------------------------------------------------------------
  6816.  
  6817. PURPOSE        Function to locate the cursor in ANSI or AVATAR mode
  6818.  
  6819.  
  6820. FORMAT         void od_set_cursor(int row, int col);
  6821.  
  6822.  
  6823. RETURNS        N/A
  6824.  
  6825.  
  6826. DESCRIPTION    This function will only have an effect if the user has ANSI or
  6827.                AVATAR graphics mode turned on. In graphics mode, this function
  6828.                can be used to position the cursor anywhere on the screen (cursor
  6829.                is moved both locally and on the remote terminal). The first
  6830.                parameter "row", can normally have a value between 1 to 23, and
  6831.                indicates the row, or y position on the screen, where the cursor
  6832.                should be located. The second parameter, "col",  can have a value
  6833.                between 1 and 80, and indicates the column (x-position) on the
  6834.                screen, where the cursor should be located.
  6835.  
  6836.  
  6837. SEE ALSO       od_emulate(), od_clr_scr(), od_clr_line(), od_set_colour(),
  6838.                od_set_attrib()
  6839.  
  6840.  
  6841. EXAMPLE        Below is a simple sample door that demonstrates the use of the
  6842.                od_set_cursor() function. Note that this door detects whether or
  6843.                not graphics mode is available, and if it is not, will carry out
  6844.                the same task without the use of the od_set_cursor() function.
  6845.  
  6846.                          #include "opendoor.h"
  6847.  
  6848.                          int main(int argc,char *argv[])
  6849.                             {
  6850.                             od_init();          /* Initialize door operations */
  6851.                             od_clr_scr();                 /* Clear the screen */
  6852.  
  6853.                             if(od_control.user_ansi || od_control.user_avatar)
  6854.                                {             /* If graphics mode is available */
  6855.                                od_set_cursor(1,1);            /* Display demo */
  6856.                                od_disp_str("Top, Left Corner");
  6857.  
  6858.                                od_set_cursor(1,70);
  6859.                                od_disp_str("Top, Right Corner");
  6860.  
  6861.                                od_set_cursor(15,1);
  6862.                                od_disp_str("Fifteenth line\n\r");
  6863.                                }
  6864.  
  6865.                             else         /* If graphics mode is not available */
  6866.  
  6867.  
  6868. OpenDoors Door Toolkit Manual - Version 4.10                       Page 111
  6869.  
  6870.  
  6871.  
  6872.                                {                              /* Display demo */
  6873.                                od_disp_str("Top, Left Corner
  6874.                                                         Top, Right Corner\n\r");
  6875.                                                              /* Skip 13 lines */
  6876.                                od_disp_str("\n\n\n\n\n\n\n\n\n\n\n\n\n");
  6877.                                od_disp_str("Fifteenth line\n\r");
  6878.                                }
  6879.  
  6880.                             od_get_key(TRUE);   /* Wait for user to press key */
  6881.                             od_exit(FALSE,20);                   /* Exit door */
  6882.                             }
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.  
  6890.  
  6891.  
  6892.  
  6893.  
  6894.  
  6895.  
  6896.  
  6897.  
  6898.  
  6899.  
  6900.  
  6901.  
  6902.  
  6903.  
  6904.  
  6905.  
  6906.  
  6907.  
  6908.  
  6909.  
  6910.  
  6911.  
  6912.  
  6913.  
  6914.  
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.  
  6927.  
  6928.  
  6929.  
  6930. OpenDoors Door Toolkit Manual - Version 4.10                       Page 112
  6931.  
  6932.  
  6933.  
  6934.  
  6935.  
  6936.  
  6937.  
  6938. OD_SET_STATUSLINE()
  6939. --------------------------------------------------------------------------------
  6940.  
  6941. PURPOSE        To set the currently displayed status line.
  6942.  
  6943.  
  6944. FORMAT         void od_set_statusline(char setting);
  6945.  
  6946.  
  6947. RETURNS        N/A
  6948.  
  6949.  
  6950. DESCRIPTION    If you have the OpenDoors status line enabled within your door
  6951.                program (as is the default), the sysop will be able to control
  6952.                the setting of the status line using the F1 - F10 keys on the
  6953.                keyboard. These function keys are as follows:
  6954.  
  6955.                          [F1] -  Display basic door and user information
  6956.                          [F2] -  Display phone numbers and important dates
  6957.                          [F3] -  Display security flags and up/download info
  6958.                          [F4] -  Display system information and current time
  6959.                          [F5] -  Display message info and user's settings
  6960.                          [F6] -  Display chat reason and sysop's comment
  6961.                          [F9] -  Display help information for sysop
  6962.                          [F10] - Turn off the status line
  6963.  
  6964.                Using the od_set_statusline() function, you can manually set
  6965.                which of these status line settings is currently selected. The
  6966.                od_set_statusline() accepts a single parameter, which should be
  6967.                one of the values listed below, which indicates which status line
  6968.                you would like to have selected:
  6969.  
  6970.                +---------------+---------------+-------------------------------+
  6971.                |               | Corresponding |                               |
  6972.                | Value         | Function Key  | Meaning                       |
  6973.                +---------------+---------------+-------------------------------+
  6974.                | STATUS_NORMAL | [F1]          | Basic door and user info      |
  6975.                | STATUS_NONE   | [F10]         | Turn off status line          |
  6976.                | STATUS_HELP   | [F9]          | Displays help for the sysop   |
  6977.                | STATUS_USER1  | [F2]          | Phone Numbers and dates       |
  6978.                | STATUS_USER2  | [F3]          | Security flags & up/downloads |
  6979.                | STATUS_USER3  | [F5]          | Message info & user settings  |
  6980.                | STATUS_USER4  | [F6]          | Chat reason and sysop comment |
  6981.                | STATUS_SYSTEM | [F4]          | System info & current time    |
  6982.                +---------------+---------------+-------------------------------+
  6983.                (Note that these keys may be customized using variables in the
  6984.                 OpenDoors control structure.)
  6985.  
  6986.                Keep in mind that the od_set_statusline() function only
  6987.                temporarily changes the current status line setting, and that the
  6988.                sysop will still be able to change the status line to any of the
  6989.                other settings using the function keys. For instance, if you
  6990.  
  6991.  
  6992. OpenDoors Door Toolkit Manual - Version 4.10                       Page 113
  6993.  
  6994.  
  6995.  
  6996.                wished to allow the sysop to normally see all 25 lines of text
  6997.                displayed by your door, but at the same time to still allow the
  6998.                sysop to turn on the status line at any time, you could place the
  6999.                line
  7000.  
  7001.                           od_set_statusline(STATUS_NONE);
  7002.  
  7003.                at the beginning of your program. Similarly, when the user pages
  7004.                the sysop, OpenDoors itself calls
  7005.  
  7006.                          od_set_statusline(STATUS_USER4);
  7007.  
  7008.                in order to display the status line which shows the user's reason
  7009.                for chat, while still allowing the sysop to switch back to any of
  7010.                the other status lines.
  7011.  
  7012.                If you wish to permanently turn off the OpenDoor's status line,
  7013.                without allowing the sysop to be able to turn it back on using
  7014.                the sysop function keys, simply set the "od_control.od_status_on"
  7015.                variable to FALSE. This variable is described in the OpenDoors
  7016.                control structure section of this manual, which begins on page
  7017.                119.
  7018.  
  7019.  
  7020.  
  7021.  
  7022.  
  7023.  
  7024.  
  7025.  
  7026.  
  7027.  
  7028.  
  7029.  
  7030.  
  7031.  
  7032.  
  7033.  
  7034.  
  7035.  
  7036.  
  7037.  
  7038.  
  7039.  
  7040.  
  7041.  
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054. OpenDoors Door Toolkit Manual - Version 4.10                       Page 114
  7055.  
  7056.  
  7057.  
  7058.  
  7059.  
  7060.  
  7061.  
  7062. OD_SPAWN()
  7063. --------------------------------------------------------------------------------
  7064.  
  7065. PURPOSE        To facilitate easy execution of child tasks from doors.
  7066.  
  7067.  
  7068. FORMAT         int od_spawn(char *command_line);
  7069.  
  7070.  
  7071. RETURNS        TRUE on success,
  7072.                FALSE on failure
  7073.  
  7074.  
  7075. DESCRIPTION    This function allows you to easily run other programs from within
  7076.                your door programs, such as external file transfer utilities,
  7077.                compression utilities, and so on.
  7078.  
  7079.                This function will attempt to swap OpenDoors and your entire door
  7080.                to expanded memory or disk. OpenDoors swapping can be controlled
  7081.                by the OpenDoors control structure variables,
  7082.                od_swapping_disable, od_swapping_ems and od_swap_path. The
  7083.                od_spawn...() functions first attempt to swap OpenDoors to EMS
  7084.                memory. If enough EMS 3.2 or later memory is available, it will
  7085.                be used. If not, OpenDoors will swap to a disk file in the
  7086.                directory specified by the od_control.od_swap_path variable.
  7087.  
  7088.                Unlike the other Turbo C(++) / Borland C++ library functions such
  7089.                as system() or spawnf(), this function will automatically store
  7090.                the door screen prior to executing the sub-program, and will
  7091.                restore the screen upon return. This function will also store the
  7092.                current drive and directory settings prior to executing the
  7093.                program, and restore them after the program has returned.
  7094.  
  7095.                Normally, the user's time will continue to be decreased during
  7096.                the execution of the od_spawn() function. However, you can freeze
  7097.                the user's time during the spawn process by using the OpenDoors
  7098.                control structure variable od_spawn_freeze_time.
  7099.  
  7100.  
  7101. SEE ALSO       od_spawnvpe()
  7102.  
  7103.  
  7104. EXAMPLE        Below are a few examples of various uses of the od_spawn()
  7105.                function:
  7106.  
  7107.                To run the command processor from within your door program, to
  7108.                allow the sysop access to the DOS shell, simply use the following
  7109.                line of code:
  7110.  
  7111.                               od_spawn(getenv("COMSPEC"));
  7112.  
  7113.  
  7114.  
  7115.  
  7116. OpenDoors Door Toolkit Manual - Version 4.10                       Page 115
  7117.  
  7118.  
  7119.  
  7120.                The following function is an example of using the od_spawn()
  7121.                function to call DSZ, allowing the user to download a file. You
  7122.                pass the name of the file that you wish to send to the user. This
  7123.                function will then ask the user what transfer protocol they would
  7124.                like to use, generate the appropriate DSZ command line, and then
  7125.                transmit the file to the user. Note that in order to use a door
  7126.                which implements this function, the external file transfer
  7127.                program "DSZ" must be available in the current search path. As an
  7128.                alternative, you may want to allow the sysop to specify the
  7129.                location of the DSZ file from within a configuration program. If
  7130.                you wish to receive a file (allow the user to upload), instead of
  7131.                sending one, simply change the "s" in the command line to a "r".
  7132.  
  7133.                char download(char *filename)
  7134.                   {
  7135.                   char commandline[80]; /* string containing DSZ command line */
  7136.                   char protocol;    /* character representing chosen protocol */
  7137.  
  7138.                                                      /* display protocol menu */
  7139.                   od_printf("Select File Transfer Protocol:\n\r");
  7140.                   od_printf("   [X] XModem\n\r");
  7141.                   od_printf("   [Y] YModem\n\r");
  7142.                   od_printf("   [Z] ZModem\n\r");
  7143.                   od_printf("or press [A] to abort transfer\n\r");
  7144.  
  7145.                   do             /* loop until valid protocol has been chosen */
  7146.                      {
  7147.                      protocol=od_get_key();  /* get key */
  7148.                                                /* abort if [A] key is pressed */
  7149.                      if(protocol=='a' || protocol=='A') return(FALSE);
  7150.                      } while(protocol!='x' && protocol!='y' && protocol!='z' &&
  7151.                              protocol!='X' && protocol!='Y' && protocol!='Z');
  7152.  
  7153.                   od_printf("Begin receiving file now or press [CTRL]-[X] to
  7154.                              abort\n\r");
  7155.                                                  /* generate DSZ command line */
  7156.                   sprintf(commandline,"dsz port %d s%c %s",
  7157.                           od_control.port+1,
  7158.                           protocol,
  7159.                           filename);
  7160.  
  7161.                   return(od_spawn(commandline));              /* spawn to DSZ */
  7162.                   }
  7163.  
  7164.  
  7165.  
  7166.  
  7167.  
  7168.  
  7169.  
  7170.  
  7171.  
  7172.  
  7173.  
  7174.  
  7175.  
  7176.  
  7177.  
  7178. OpenDoors Door Toolkit Manual - Version 4.10                       Page 116
  7179.  
  7180.  
  7181.  
  7182.  
  7183. OD_SPAWNVPE()
  7184. --------------------------------------------------------------------------------
  7185.  
  7186. PURPOSE        To facilitate easy execution of child tasks from doors. Allows
  7187.                specification of childs environment, returns errorlevel returned
  7188.                by child task, and seaches path for the executable file.
  7189.  
  7190.  
  7191. FORMAT         int od_spawnvpe(int modeflag, char *path, char *argv[],
  7192.                                char *envp[]);
  7193.  
  7194.  
  7195. RETURNS        -1 on failure
  7196.                errorlevel returned by child process on success
  7197.  
  7198.  
  7199. DESCRIPTION    This function behaves very similarly to the od_spawn() function.
  7200.                Thus, to save space in the manual, I will not recapitulate what
  7201.                is already said in the description of the od_spawn() function.
  7202.                Instead, this description concentrates on the additional features
  7203.                available through the od_spawnvpe() function. If you are not
  7204.                already familiar with the od_spawn() function, take a moment now
  7205.                to review the description of that function.
  7206.  
  7207.                The od_spawn() function (the OpenDoors "quick-spawn" function) is
  7208.                designed to be quick and easy to use, but does not have all of
  7209.                the features available in the od_spawnvpe() function. In addition
  7210.                to the features of the od_spawn() function, the od_spawnvpe()
  7211.                function also provides the following features:
  7212.  
  7213.                          - od_spawnvpe() will search the "path" for the file
  7214.                            to be executed.
  7215.  
  7216.                          - od_spawnvpe() allows you to pass an altered
  7217.                            environment to the child process.
  7218.  
  7219.                          - od_spawnvpe() returns the errorlevel returned by
  7220.                            the child process.
  7221.  
  7222.                The parameters passed to the od_spawnvpe() function are identical
  7223.                to those passed to the C spawnvpe() function. The first paramter
  7224.                should usually the be P_WAIT flag. The second parameter is the
  7225.                name of the child program to execute. If a full path to the child
  7226.                program is not specified, and the child program does not exist in
  7227.                the current directory, OpenDoors will search the directories
  7228.                listed by the PATH environment variable. Also, if the .EXE or
  7229.                .COM extention is not provide, OpenDoors will look forst for a
  7230.                .COM file, and if not found, for a .EXE file. The third parameter
  7231.                is an array of arguments to pass to the child process, or NULL if
  7232.                no arguments are to be passed. The fourth parameter is the
  7233.                environment to be passed to the child process, or NULL if the a
  7234.                copy of the current environment should be used.
  7235.  
  7236.  
  7237. SEE ALSO       od_spawn()
  7238.  
  7239.  
  7240. OpenDoors Door Toolkit Manual - Version 4.10                       Page 117
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246. EXAMPLE        For an example of the use of the od_spawn...() functions, see the
  7247.                example accompanying the od_spawn() function. As a specific
  7248.                exampe of the od_spawnvpe function, consider the following code
  7249.                which executes the "TEST.EXE" program.
  7250.  
  7251.                          od_spawnvpe(P_WAIT,"TEST.EXE",NULL,NULL);
  7252.  
  7253.  
  7254.  
  7255.  
  7256.  
  7257.  
  7258.  
  7259.  
  7260.  
  7261.  
  7262.  
  7263.  
  7264.  
  7265.  
  7266.  
  7267.  
  7268.  
  7269.  
  7270.  
  7271.  
  7272.  
  7273.  
  7274.  
  7275.  
  7276.  
  7277.  
  7278.  
  7279.  
  7280.  
  7281.  
  7282.  
  7283.  
  7284.  
  7285.  
  7286.  
  7287.  
  7288.  
  7289.  
  7290.  
  7291.  
  7292.  
  7293.  
  7294.  
  7295.  
  7296.  
  7297.  
  7298.  
  7299.  
  7300.  
  7301.  
  7302. OpenDoors Door Toolkit Manual - Version 4.10                       Page 118
  7303.  
  7304.  
  7305.  
  7306.  
  7307. --------------------------------------------------------------------------------
  7308. CHAPTER 5 - THE OPENDOORS CONTROL STRUCTURE
  7309. --------------------------------------------------------------------------------
  7310.  
  7311.  
  7312.  
  7313.  
  7314. INTRODUCTION TO THE CONTROL STRUCTURE
  7315. --------------------------------------------------------------------------------
  7316.  
  7317.                The OpenDoors "Control Structure" is used by the OpenDoors door
  7318.                driver in order to provide you with a wide range of information
  7319.                about the system on which you door is running, and the user who
  7320.                is currently using the door, along with providing you a means by
  7321.                which to customize much of OpenDoor's behaviour. Using the
  7322.                OpenDoors control structure, you can access or alter information
  7323.                about the user who is online, information about the system on
  7324.                which your door is running, and information about OpenDoors
  7325.                itself. You can also use the control structure to customize all
  7326.                of the text displayed by OpenDoors, the function keys to which it
  7327.                responds, and many other aspects of OpenDoor's behaviour.
  7328.  
  7329.                The OpenDoors control structure is quite simply a normal C
  7330.                "struct", named od_control, and is defined in the OPENDOOR.H
  7331.                file. This "struct" contains many different variables, which
  7332.                provide you access to the information provided by the control
  7333.                structure. Hence, to access the contents of a control structure
  7334.                variable, for example the variable "system_name" which contains
  7335.                the name of the BBS the door is running under, you would use:
  7336.  
  7337.                                   od_control.system_name
  7338.  
  7339.                The following section of this chapter contains a complete
  7340.                reference to all of the variables which make up the OpenDoors
  7341.                control structure. This reference includes the name, type and
  7342.                complete description of the use of each variable. The reference
  7343.                is divided into the following categories of variables, with the
  7344.                reference to the variables in each section beginning on the
  7345.                listed page.
  7346.  
  7347.                          Door Information File Statistics .................121
  7348.                          Modem Settings ...................................124
  7349.                          BBS and Caller Information .......................125
  7350.                          Door Settings ....................................146
  7351.                          OpenDoors Behaviour Customization ................149
  7352.                          Function Keys Customization ......................160
  7353.                          Colour Customization .............................163
  7354.                          Text Customization ...............................164
  7355.  
  7356.                Within each section, variables are listed alphabetically,
  7357.                according to their names.
  7358.  
  7359.                If you would like more information on C "struct"s, please refer
  7360.                to your Turbo C(++)/Borland C++ manuals.
  7361.  
  7362.  
  7363.  
  7364. OpenDoors Door Toolkit Manual - Version 4.10                       Page 119
  7365.  
  7366.  
  7367.  
  7368.                Also, in order to make use of some of the variables in the
  7369.                OpenDoors control structure, it is important to understand the
  7370.                concepts of boolean (TRUE/FALSE), and bit-mapped flag variables.
  7371.                If you are not familiar with these two terms, they are described
  7372.                in detail in the glossary, located towards the end of this
  7373.                manual.
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.  
  7380.  
  7381.  
  7382.  
  7383.  
  7384.  
  7385.  
  7386.  
  7387.  
  7388.  
  7389.  
  7390.  
  7391.  
  7392.  
  7393.  
  7394.  
  7395.  
  7396.  
  7397.  
  7398.  
  7399.  
  7400.  
  7401.  
  7402.  
  7403.  
  7404.  
  7405.  
  7406.  
  7407.  
  7408.  
  7409.  
  7410.  
  7411.  
  7412.  
  7413.  
  7414.  
  7415.  
  7416.  
  7417.  
  7418.  
  7419.  
  7420.  
  7421.  
  7422.  
  7423.  
  7424.  
  7425.  
  7426. OpenDoors Door Toolkit Manual - Version 4.10                       Page 120
  7427.  
  7428.  
  7429.  
  7430.  
  7431.  
  7432.  
  7433.  
  7434. CONTROL STRUCTURE - DOOR INFO FILE STATS
  7435. --------------------------------------------------------------------------------
  7436.  
  7437.                The following OpenDoors control structure variables provide your
  7438.                program with information concerning the door information file
  7439.                from which OpenDoors obtained the BBS and caller information that
  7440.                is found elsewhere in the control structure. The following
  7441.                control structure items are listed in this section:
  7442.  
  7443.                info_path                Contains the path to the door
  7444.                                         information file
  7445.  
  7446.                od_info_type             Type of door information file that was
  7447.                                         found
  7448.  
  7449.                od_node                  Node number the door is running under
  7450.  
  7451.                user_timeofcreation      The time at which the door information
  7452.                                         file was created
  7453.  
  7454.  
  7455.  
  7456.  
  7457. --------------------------------------------------------------------------------
  7458. info_path      char od_control.info_path[60];
  7459.  
  7460.                This variable stores the location of the door information file
  7461.                (such as DORINFO?.DEF, EXITINFO.BBS, CHAIN.TXT, DOOR.SYS,
  7462.                CALLINFO.BBS, SFDOORS.DAT, etc.), from which OpenDoors will read
  7463.                and write information about the BBS and the caller online. Note,
  7464.                however, that this variable only contains the path to this file,
  7465.                and not the name of the file itself. For example, if your door
  7466.                knew that the door information file resided in C:\BBS, this
  7467.                variable might contain "C:\\BBS\\". Remember that when
  7468.                programming in C, that you must place two backslash characters in
  7469.                a literal string in order to have a single backslash placed in
  7470.                the actual string, as shown in the example string above. The
  7471.                info_path variable is not case sensitive, and may or may not
  7472.                include the trailing backslash in the directory name.
  7473.  
  7474.                OpenDoors only uses this variable when it first starts up, during
  7475.                the od_init() function, and when it shuts down, during the
  7476.                od_exit() function. Thus, if you wish to alter the setting of the
  7477.                info_path variable, you must do so before calling od_init(), or
  7478.                any other OpenDoors functions. Also, you will not normally want
  7479.                to change the value of this variable after having called
  7480.                od_init() or any OpenDoors functions, as doing so would cause
  7481.                OpenDoors to re-write the caller information to another door
  7482.                information file in a different directory. This would most likely
  7483.                prevent the BBS system which your door is running under from
  7484.                being able to re-read the changes to the door information file.
  7485.  
  7486.  
  7487.  
  7488. OpenDoors Door Toolkit Manual - Version 4.10                       Page 121
  7489.  
  7490.  
  7491.  
  7492.                It is usually a good idea to design any door in such a way as to
  7493.                allow the user of the door to specify the location of the door
  7494.                information file. This will allow the sysop to place your door in
  7495.                it's own directory, and will facilitate the use of your door on
  7496.                multi-line BBS systems. If your door has a configuration file,
  7497.                you may wish to include a setting in the configuration file to
  7498.                indicate the location of the door information file. However, an
  7499.                even better design choice would be to allow the location of the
  7500.                door information file to optionally be passed to the door on the
  7501.                command line, as the example door, EZVote does. The following
  7502.                trivial door illustrates a method of reading and setting the
  7503.                location of the door information file from the door's command
  7504.                line:
  7505.  
  7506.                #include "opendoor.h"
  7507.  
  7508.                main(int argc, char *argv[])
  7509.                   {
  7510.                   if(argc>1) strncpy(od_control.info_path,argv[1],59);
  7511.  
  7512.                   od_disp_str("This is a sample OpenDoors door.\n\r");
  7513.                   od_disp_str("Press any key to continue...\n\r");
  7514.                   od_get_key(TRUE);
  7515.                   od_exit(20);
  7516.                   }
  7517.  
  7518.  
  7519.  
  7520. --------------------------------------------------------------------------------
  7521. od_info_type   char od_control.od_info_type;
  7522.  
  7523.                This variable indicates the type of information file from which
  7524.                OpenDoors has obtained the BBS and caller information that is
  7525.                found elsewhere in the OpenDoors control structure. This variable
  7526.                will have one of the following values, indicating that the door
  7527.                information file was of the corresponding type:
  7528.  
  7529.                      +----------------+----------------------------+
  7530.                      |  od_info_type  | Door Information File Type |
  7531.                      |      Value     |                            |
  7532.                      +----------------+----------------------------+
  7533.                      | DORINFO1       | DORINFO?.DEF               |
  7534.                      | EXITINFO       | EXITINFO.BBS (Normal)      |
  7535.                      | RA1EXITINFO    | EXITINFO.BBS (Extended)    |
  7536.                      | QBBS275EXITINFO| EXITINFO.BBS (QuickBBS)    |
  7537.                      | CHAINTXT       | CHAIN.TXT                  |
  7538.                      | SFDOORSDAT     | SFDOORS.DAT                |
  7539.                      | CALLINFO       | CALLINFO.BBS               |
  7540.                      | DOORSYS_GAP    | DOOR.SYS (GAP/PC-Board)    |
  7541.                      | DOORSYS_DRWY   | DOOR.SYS (Doorway style)   |
  7542.                      | DOORSYS_WILDCAT| DOOR.SYS (WildCat standard)|
  7543.                      |                |                            |
  7544.                      | CUSTOM         | Custom door information    |
  7545.                      |                | file, defined in config    |
  7546.                      |                | file.                      |
  7547.                      +----------------+----------------------------+
  7548.  
  7549.  
  7550. OpenDoors Door Toolkit Manual - Version 4.10                       Page 122
  7551.  
  7552.  
  7553.  
  7554.  
  7555.                The value of this variable is only valid AFTER od_init() or some
  7556.                OpenDoors door driver function has been called.
  7557.  
  7558.                Note that this variable should be treated as a read-only
  7559.                variable, and should not normally be altered by your program.
  7560.                Altering this variable may cause OpenDoors to re-write a
  7561.                different type of door information file upon exiting, than was
  7562.                read upon startup.
  7563.  
  7564.  
  7565.  
  7566. --------------------------------------------------------------------------------
  7567. od_node        char od_control.od_node;
  7568.  
  7569.                This variable indicates the node number that the door is running
  7570.                under. If this information is supplied by the BBS in the door
  7571.                information file, the node number will be automatically by
  7572.                OpenDoors. Specifically, the node number can be determined
  7573.                automatically from systems that produce an SFDOORS.DAT, PC-
  7574.                Board/GAP style DOOR.SYS or Wildcat style DOOR.SYS door
  7575.                information file. If this information is not supplied in the door
  7576.                information file, but is provided by the sysop in the door's
  7577.                configuration file, OpenDoors will use the value found there.
  7578.                Alternatively, you can set this variable manually.
  7579.  
  7580.                On systems that produce a DORINFO?.DEF file, OpenDoors will use
  7581.                this variable to determine which DORINFO?.DEF file to search for.
  7582.                For instance, if od_control.od_node is set to 3, OpenDoors will
  7583.                first search for a DORINFO3.DEF file. If this file is not found,
  7584.                OpenDoors will then default to the DORINFO1.DEF filename.
  7585.  
  7586.  
  7587.  
  7588.  
  7589. --------------------------------------------------------------------------------
  7590. user           char od_control.user_timeofcreation[6];
  7591. _timeof
  7592. creation       This variable contains the time of day at which the door
  7593.                information file was created. This variable is available only
  7594.                when the door is running under a system that produces an
  7595.                EXITINFO.BBS file. To determine what type of door information
  7596.                file your door is running under, see the od_control.od_info_type
  7597.                variable, below.
  7598.  
  7599.  
  7600.  
  7601.  
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.  
  7609.  
  7610.  
  7611.  
  7612. OpenDoors Door Toolkit Manual - Version 4.10                       Page 123
  7613.  
  7614.  
  7615.  
  7616.  
  7617.  
  7618.  
  7619.  
  7620. CONTROL STRUCTURE - MODEM SETTINGS
  7621. --------------------------------------------------------------------------------
  7622.  
  7623.                The following OpenDoors control structure items store the
  7624.                communications settings that OpenDoors uses to communicate with
  7625.                the modem. These values are normally set upon the first call to
  7626.                an OpenDoors door driver function, during the od_init()
  7627.                procedure. However, if you are reading the door information file
  7628.                yourself, or using the OpenDoors door driver to write some sort
  7629.                of non-door program, where you have disabled the reading of the
  7630.                door information file, you will have to set these values yourself
  7631.                before you use any of the OpenDoors door driver functions.
  7632.  
  7633.  
  7634.  
  7635. --------------------------------------------------------------------------------
  7636. port           char od_control.port;
  7637.  
  7638.                This variable contains the FOSSIL port number of the modem. Note
  7639.                that most often, FOSSIL port 0 corresponds to COM1:, FOSSIL port
  7640.                1 corresponds to COM2:, and so on. This value will normally be
  7641.                set by the od_init() function, when the door information file is
  7642.                read, and should not be changed after modem initialization has
  7643.                been carried out by the od_init() function. In other words,
  7644.                od_control.port should generally be treated as a read-only
  7645.                variable.
  7646.  
  7647.                This variable will most often be useful in passing the port
  7648.                number to an external program, such as DSZ.
  7649.  
  7650.  
  7651.  
  7652. --------------------------------------------------------------------------------
  7653. baud           unsigned int od_control.baud;
  7654.  
  7655.                This variable contains the actual BPS rate at which the modem is
  7656.                operating. Note that if a high speed modem is in use, that the
  7657.                comm port may actually be locked at a higher baud rate.
  7658.  
  7659.  
  7660.  
  7661.  
  7662.  
  7663.  
  7664.  
  7665.  
  7666.  
  7667.  
  7668.  
  7669.  
  7670.  
  7671.  
  7672.  
  7673.  
  7674. OpenDoors Door Toolkit Manual - Version 4.10                       Page 124
  7675.  
  7676.  
  7677.  
  7678.  
  7679.  
  7680.  
  7681. CONTROL STRUCTURE - BBS AND CALLER INFORMATION
  7682. --------------------------------------------------------------------------------
  7683.  
  7684.                As we have already described, there are two types of variables in
  7685.                the OpenDoors control structure. Some of the variables are simply
  7686.                used to allow you to customize OpenDoor's various features, such
  7687.                as altering colours, prompts, timeouts, etc. Other variables in
  7688.                the OpenDoors control structure serve to provide you with
  7689.                information about the user who is online and the BBS system your
  7690.                door is running under. This section deals with those variables
  7691.                that provide you with information about the BBS and the user.
  7692.  
  7693.                The information in these variables is read from the door
  7694.                information file, a small file created by the BBS specifically
  7695.                for the purpose of communicating with door programs. Depending on
  7696.                what BBS system your door is running under, the type of door
  7697.                information file will vary. Since different door information
  7698.                files do not all provide the same pieces of information, some
  7699.                variables in this section will only be available when your door
  7700.                is running under particular BBS systems.  Other variables will be
  7701.                available with many or all BBS systems. In the description of
  7702.                each variable in this section, we indicate under which door
  7703.                information files the particular variable will be . So, if you
  7704.                wish to access a variable that is only under certain door
  7705.                information files, your program should test whether or not the
  7706.                required information is available under the particular door
  7707.                information file that was found. In order to determine which door
  7708.                information file your door is running under, you should use the
  7709.                od_control.od_info_type variable. This variable is described in
  7710.                the section which begins on page 121. If you test the value of
  7711.                the od_control.od_info_type variable, and find that the required
  7712.                information is not available, you may wish to simply use some
  7713.                sort of default value for the variable, or alternatively, not
  7714.                allow your door to run under certain BBS systems. Another
  7715.                possibility, if the required information is not available, is
  7716.                imply to obtain this information from the user yourself. For
  7717.                example, if you wished to know the length of the user's screen,
  7718.                when this information is not available from the door information
  7719.                file, you could simply prompt the user for their screen length
  7720.                the first time they use your door. This information could then be
  7721.                stored in your door's data files for future reference.
  7722.  
  7723.                As an example of testing what door information file your door is
  7724.                running under, consider the case where you wanted to display the
  7725.                user's birthday. The example below will display the user's
  7726.                birthday if it is known, and otherwise, print the string
  7727.                "unknown".
  7728.  
  7729.                          if(od_control.od_info_type==RA1EXITINFO)
  7730.                             {
  7731.                             od_disp_str(od_control.user_birthday);
  7732.                             }
  7733.                          else
  7734.  
  7735.  
  7736. OpenDoors Door Toolkit Manual - Version 4.10                       Page 125
  7737.  
  7738.  
  7739.  
  7740.                             {
  7741.                             od_disp_str("Unknown");
  7742.                             }
  7743.  
  7744.                The chart below lists the door information file formats that
  7745.                OpenDoors recognizes, along with example BBS systems that produce
  7746.                these files and a reference letter for each type. Thus, an
  7747.                OpenDoors door can run DIRECTLY under ANY BBS SYSTEM that
  7748.                produces one of these files formats, and under ANY OTHER BBS
  7749.                system when used in conjunction with a door information file
  7750.                conversion utility.
  7751.  
  7752. +--------------------------+----------------------------------------+
  7753. | FILE FORMAT              | EXAMPLE BBS SYSTEMS                    |
  7754. +--------------------------+----------------------------------------+
  7755. | CHAIN.TXT                | WWIV                                   |
  7756. +--------------------------+----------------------------------------+
  7757. | DORINFO1.DEF             | RBBS-PC                                |
  7758. +--------------------------+----------------------------------------+
  7759. | DORINFO1.DEF             | QuickBBS                               |
  7760. |      &                   | Remote Access (versions 0.01-0.04)     |
  7761. | EXITINFO.BBS (Std. Ver.) |                                        |
  7762. +--------------------------+----------------------------------------+
  7763. | DOOR.SYS (DoorWay Style) | Remote Access                          |
  7764. +--------------------------+----------------------------------------+
  7765. | DOOR.SYS (PCB/GAP Style) | PC-Board                               |
  7766. |                          | GAP                                    |
  7767. +--------------------------+----------------------------------------+
  7768. | DOOR.SYS (WildCat Style) | Wildcat 3.00 and above                 |
  7769. |                          | Telegard                               |
  7770. +--------------------------+----------------------------------------+
  7771. | SFDOORS.DAT              | Spitfire                               |
  7772. |                          | TriTel                                 |
  7773. +--------------------------+----------------------------------------+
  7774. | CALLINFO.BBS             | WildCat 2.xx                           |
  7775. +--------------------------+----------------------------------------+
  7776. | DORINFO1.DEF             | Remote Access (versions 1.00 and later)|
  7777. |      &                   |                                        |
  7778. | EXITINFO.BBS (Ext. Ver.) |                                        |
  7779. +--------------------------+----------------------------------------+
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.  
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.  
  7793.  
  7794.  
  7795.  
  7796.  
  7797.  
  7798. OpenDoors Door Toolkit Manual - Version 4.10                       Page 126
  7799.  
  7800.  
  7801.  
  7802.  
  7803.  
  7804.  
  7805.                The following chart lists all of the OpenDoors control structure
  7806.                variables in this section, along with a brief description of
  7807.                their use. The variables are then described in detail, below.
  7808.  
  7809. +-----------------------+-----------------------------------------------+
  7810. | VARIABLE NAME         | VARIABLE CONTENTS                             |
  7811. +-----------------------+-----------------------------------------------+
  7812. | EMSI INFORMATION      | Information on current IEMSI session          |
  7813. | event_status          | The status of the next system event           |
  7814. | event_starttime       | The start time of the next system event       |
  7815. | event_errorlevel      | The errorlevel of the next system event       |
  7816. | event_days            | The days of the week to execute the event     |
  7817. | event_force           | Whether the next system event is forced       |
  7818. | event_last_run        | When the next system event was last run       |
  7819. | sysop_name            | The name of the BBS's sysop                   |
  7820. | system_calls          | Total number of calls BBS has received        |
  7821. | system_last_caller    | The name of the last caller to the BBS        |
  7822. | system_name           | The name of the BBS                           |
  7823. | TIMELOG VARIABLES     | The times at which the BBS has been most busy |
  7824. | user_ansi             | Whether the user has ANSI graphics mode on    |
  7825. | user_attribute        | User attribute bit-mapped flags               |
  7826. | user_attrib2          | Second set of user attribute bit-mapped flags |
  7827. | user_avatar           | Whether the user has AVATAR graphics mode on  |
  7828. | user_birthday         | The date the user was born                    |
  7829. | user_callsign         | The user's amateur radio call sign            |
  7830. | user_combinedrecord   | The user's combined message areas settings    |
  7831. | user_comment          | Sysop's comment about the user                |
  7832. | user_credit           | Amount of NetMail credit the user has         |
  7833. | user_dataphone        | The user's data phone number                  |
  7834. | user_date_format      | Format user wishes to have dates displayed in |
  7835. | user_deducted_time    | Total time that has been subtracted from user |
  7836. | user_downk            | Total Kilobytes downloaded by the user        |
  7837. | user_downlimit        | User's daily download limit                   |
  7838. | user_downloads        | Total number of files downloaded by the user  |
  7839. | user_echomailentered  | Whether or not the user has entered EchoMail  |
  7840. | user_error_free       | Whether or not connection is error-free       |
  7841. | user_file_area        | The user's current file area                  |
  7842. | user_firstcall        | Date of the user's first call to the BBS      |
  7843. | user_flags            | User's sysop-defined flag settings            |
  7844. | user_forward_to       | Name to forward user's mail to                |
  7845. | user_group            | User's group number                           |
  7846. | user_handle           | User's alias                                  |
  7847. | user_homephone        | User's home telephone number                  |
  7848. | user_language         | User's language setting                       |
  7849. | user_last_pwdchange   | Total calls since last password change        |
  7850. | user_lastdate         | Date of the user's last call                  |
  7851. | user_lastread         | Highest message number read by user           |
  7852. | user_lasttime         | Time of the user's last call                  |
  7853. | user_location         | Name of the city where the user lives         |
  7854. | user_logindate        | Date on which the current call began          |
  7855. | user_loginsec         | User's security at the beginning of this call |
  7856. +-----------------------+-----------------------------------------------+
  7857.  
  7858.  
  7859.  
  7860. OpenDoors Door Toolkit Manual - Version 4.10                       Page 127
  7861.  
  7862.  
  7863.  
  7864.  
  7865.  
  7866.  
  7867. +-----------------------+-----------------------------------------------+
  7868. | VARIABLE NAME         | VARIABLE CONTENTS                             |
  7869. +-----------------------+-----------------------------------------------+
  7870. | user_logintime        | Time at which the current call began          |
  7871. | user_logonpassword    | User's password at the beginning of this call |
  7872. | user_menustack        | Contents of the user's current menu stack     |
  7873. | user_menustackpointer | Pointer to the top of the menu stack          |
  7874. | user_messages         | Total number of messages written by the user  |
  7875. | user_msg_area         | The user's current message area               |
  7876. | user_name             | The user's name                               |
  7877. | user_net_credit       | The user's remaining netmail credit           |
  7878. | user_netmailentered   | Whether or not the user has entered NetMail   |
  7879. | user_num              | The user's record number in the user file     |
  7880. | user_numcalls         | Number of calls the user has made to the BBS  |
  7881. | user_numpages         | Number of times the user has paged the sysop  |
  7882. | user_password         | The user's current password                   |
  7883. | user_pending          | The value of unsent NetMail written by user   |
  7884. | user_reasonforchat    | The reason the user wishes to chat with sysop |
  7885. | user_screen_length    | The length of the user's screen               |
  7886. | user_screenwidth      | The width of the user's screen                |
  7887. | user_security         | The user's security access level              |
  7888. | user_sex              | The user's gender                             |
  7889. | user_subdate          | The date the user's subscription expires      |
  7890. | user_timelimit        | The user's daily time limit                   |
  7891. | user_todayk           | Kilobytes downloaded by the user today        |
  7892. | user_upk              | Total Kilobytes uploaded by the user          |
  7893. | user_uploads          | Total number of files uplaoded by the user    |
  7894. | user_wantchat         | Whether or not the user wishes to chat        |
  7895. | user_xi_record        | The user's record in the USERSXI.BBS file     |
  7896. +-----------------------+-----------------------------------------------+
  7897.  
  7898.  
  7899.  
  7900.  
  7901. --------------------------------------------------------------------------------
  7902. EMSI           char od_control.ra_emsi_session;
  7903. INFORMATION    char od_control.ra_emsi_crtdef[41];
  7904.                char od_control.ra_emsi_protocols[41];
  7905.                char od_control.ra_emsi_capabilities[41];
  7906.                char od_control.ra_emsi_requests[41];
  7907.                char od_control.ra_emsi_software[41];
  7908.                char od_control.ra_hold_attr1;
  7909.                char od_control.ra_hold_attr2;
  7910.                char od_control.ra_hold_len;
  7911.  
  7912.                These variables provide your door with information pertaining to
  7913.                an interactive EMSI session that has been established. Note that
  7914.                these variables are only available under systems that produce an
  7915.                RA 1.00 and later style extended EXITINFO.BBS door information
  7916.                file.
  7917.  
  7918.  
  7919.  
  7920.  
  7921.  
  7922. OpenDoors Door Toolkit Manual - Version 4.10                       Page 128
  7923.  
  7924.  
  7925.  
  7926.                If an IEMSI session has been established, the boolean variable
  7927.                od_control.ra_emsi_session will be TRUE, and if no session has
  7928.                not been established, this variable will be FALSE.
  7929.  
  7930.                A full discussion of the IEMSI protocol is beyond the scope of
  7931.                this manual. Specifications for the IEMSI protocol are available
  7932.                from the OpenDoors support BBS.
  7933.  
  7934.  
  7935.  
  7936. --------------------------------------------------------------------------------
  7937. event_days     unsigned char od_control.event_days;
  7938.  
  7939.                This variable is a bit-mapped flag of the days of the week on
  7940.                which the next system event is run. The bit-map bits are as
  7941.                follows:
  7942.  
  7943.                        +-----+------+-----------+
  7944.                        | BIT | MASK | MEANING   |
  7945.                        +-----+------+-----------+
  7946.                        |  0  | 0x01 | Sunday    |
  7947.                        |  1  | 0x02 | Monday    |
  7948.                        |  2  | 0x04 | Tuesday   |
  7949.                        |  3  | 0x08 | Wednesday |
  7950.                        |  4  | 0x10 | Thursday  |
  7951.                        |  5  | 0x20 | Friday    |
  7952.                        |  6  | 0x40 | Saturday  |
  7953.                        |  7  | 0x80 | All Days  |
  7954.                        +-----+------+-----------+
  7955.  
  7956.                For more information on bit-mapped flags, see the glossary item
  7957.                entitled "BIT-MAPPED FLAGS".
  7958.  
  7959.                This variable is only available under systems that produce an
  7960.                EXITINFO.BBS door information file.
  7961.  
  7962.  
  7963.  
  7964. --------------------------------------------------------------------------------
  7965. event_         unsigned char od_control.event_errorlevel;
  7966. errorlevel
  7967.                This variable contains the ErrorLevel associated with the next
  7968.                system event. This variable is only available under systems that
  7969.                produce an EXITINFO.BBS door information file.
  7970.  
  7971.  
  7972.  
  7973. --------------------------------------------------------------------------------
  7974. event          char od_control.event_force;
  7975. _force
  7976.                This variable indicates whether the next system event should be
  7977.                forced to run at a particular time. If this variable contains a
  7978.                value of TRUE, then the user should be forced off-line in order
  7979.                to accommodate the event, and if this variable is false, then the
  7980.                event can wait until after the user logs off normally. This
  7981.  
  7982.  
  7983.  
  7984. OpenDoors Door Toolkit Manual - Version 4.10                       Page 129
  7985.  
  7986.  
  7987.  
  7988.                variable is only available under systems that produce an
  7989.                EXITINFO.BBS file.
  7990.  
  7991.  
  7992.  
  7993. --------------------------------------------------------------------------------
  7994. event          char od_control.event_last_run[9];
  7995. _last_run
  7996.                This variable contains a string representing the date on which
  7997.                the next system event was last run, and is in the same format as
  7998.                the user_lastdate variable. This variable is only available under
  7999.                systems that produce an EXITINFO.BBS file.
  8000.  
  8001.  
  8002.  
  8003. --------------------------------------------------------------------------------
  8004. event          char od_control.event_starttime[6];
  8005. _starttime
  8006.                This variable contains a string representing the time at which
  8007.                the next system event is scheduled to start, in the same format
  8008.                as the user_lasttime variable. This variable is only available
  8009.                under systems that produce an EXITINFO.BBS or Wildcat style
  8010.                DOOR.SYS door information file.
  8011.  
  8012.  
  8013.  
  8014. --------------------------------------------------------------------------------
  8015. event          unsigned char od_control.event_status;
  8016. _status
  8017.                This variable represents the status of the next system event, and
  8018.                will be equal to the value
  8019.  
  8020.                             ES_ENABLED
  8021.  
  8022.                if and only if the other event information contained in the
  8023.                control structure is valid. This variable is only available under
  8024.                systems that produce an EXITINFO.BBS file.
  8025.  
  8026.  
  8027.  
  8028. --------------------------------------------------------------------------------
  8029. sysop_name     char od_control.sysop_name[40];
  8030.  
  8031.                The od_control.sysop_name variable contains the name of the sysop
  8032.                of the BBS under which your door is running. This variable is
  8033.                available under any BBS system that produces a DORINFO?.DEF
  8034.                (including RA & QBBS which process both DORINFO1.DEF and
  8035.                EXITINFO.BBS files), or Wildcat style DOOR.SYS file.
  8036.  
  8037.  
  8038.  
  8039. --------------------------------------------------------------------------------
  8040. system_calls   long od_control.system_calls;
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046. OpenDoors Door Toolkit Manual - Version 4.10                       Page 130
  8047.  
  8048.  
  8049.  
  8050.                This variable contains the total number of calls that have been
  8051.                placed to the BBS, and is available under any BBS which produces
  8052.                an EXITINFO.BBS file.
  8053.  
  8054.  
  8055.  
  8056. --------------------------------------------------------------------------------
  8057. system_last    char od_control.system_last_caller[36];
  8058. _caller
  8059.                This string contains the name of the previous caller to the BBS,
  8060.                on any line, and is available under EXITINFO.BBS.
  8061.  
  8062.  
  8063.  
  8064. --------------------------------------------------------------------------------
  8065. system_name    char od_control.system_name[40];
  8066.  
  8067.                The od_control.system_name variable contains the name of the BBS
  8068.                under which your door is running. This variable is available
  8069.                under any BBS system that produces a DORINFO?.DEF (including RA &
  8070.                QBBS which process both DORINFO1.DEF and EXITINFO.BBS files).
  8071.  
  8072.  
  8073.  
  8074. --------------------------------------------------------------------------------
  8075. TIMELOG        char od_control.timelog_start_date[9];
  8076. VARIABLES
  8077.                This string contains the date of the beginning of the time period
  8078.                for which the time log is recorded. This variable is available
  8079.                under any system that produces an EXITINFO.BBS file.
  8080.  
  8081.  
  8082.                int od_control.timelog_busyperhour[24];
  8083.  
  8084.                This variable is an array of 24 elements, with each element
  8085.                indicating the total number of times the BBS was in use during
  8086.                each of the 24 hours of the day. Element 0 corresponds to the
  8087.                time period of 0:00-1:00, element 1 corresponds to the time
  8088.                period of 1:00-2:00, and so on. In order to determine the
  8089.                frequency of system use during any hour as a percentage, simply
  8090.                calculate the total of all 24 entries in the array, and divide
  8091.                any given entry by the total, in order to come up with an
  8092.                average. This variable is available under any system that
  8093.                produces an EXITINFO.BBS file.
  8094.  
  8095.  
  8096.                int od_control.timelog_busyperday[7];
  8097.  
  8098.                This variable is an array of 7 elements, with each element
  8099.                indicating the total number of times the BBS was in use during
  8100.                each of the 7 days of the week. Here, elements 0 corresponds to
  8101.                Sunday, element 1 to Monday, and so on. In order to calculate the
  8102.                frequency of system use during any day of the week, use the same
  8103.                method as for calculating the frequency of calls during each
  8104.                hour, as described above. This is only available under systems
  8105.                that produces an EXITINFO.BBS file. Note that at least some, if
  8106.  
  8107.  
  8108. OpenDoors Door Toolkit Manual - Version 4.10                       Page 131
  8109.  
  8110.  
  8111.  
  8112.                not all, versions of RemoteAccess do not maintain this variable
  8113.                correctly, and thus even with the presence of an EXITINFO.BBS
  8114.                file, this array may contain all zero entries.
  8115.  
  8116.  
  8117.  
  8118. --------------------------------------------------------------------------------
  8119. user_ansi      char od_control.user_ansi;
  8120.  
  8121.                This variable contains a boolean value, indicating whether or not
  8122.                the user has ANSI mode turned on. If ANSI graphics mode is
  8123.                enabled, this variable will contain a value of TRUE, and if ANSI
  8124.                graphics mode is disabled, this variable will contain a value of
  8125.                FALSE. Many of the OpenDoors door driver functions test the
  8126.                setting of this variable in order to determine whether or not
  8127.                they should send ANSI-graphics control characters. Also, if this
  8128.                variable contains a TRUE value, OpenDoors will display an
  8129.                "[ANSI]" indicator on the status line.
  8130.  
  8131.                You may change the value of this variable at any time after the
  8132.                first call to od_init() or any other OpenDoors door driver
  8133.                functions. Depending upon what BBS system your door is running
  8134.                under, changes to this variable may or may not result in changes
  8135.                to the user's ANSI setting upon return to the BBS.
  8136.  
  8137.                This variable is available under all door information file
  8138.                formats.
  8139.  
  8140.  
  8141.  
  8142. --------------------------------------------------------------------------------
  8143. user_          unsigned char od_control.user_attribute;
  8144. attribute
  8145.                This variable is a bitmap of eight flags, each of which represent
  8146.                individual pieces of information pertaining to the user that is
  8147.                currently online. These flags are as follows:
  8148.  
  8149.                        +-----+------+-----------------------+
  8150.                        | BIT | MASK | DESCRIPTION           |
  8151.                        +-----+------+-----------------------+
  8152.                        |  0  | 0x01 | Is the user deleted   |
  8153.                        |  1  | 0x02 | Is screen clearing on |
  8154.                        |  2  | 0x04 | Is "more" prompt on   |
  8155.                        |  3  | 0x08 | Is ANSI mode on       |
  8156.                        |  4  | 0x10 | User no-kill setting  |
  8157.                        |  5  | 0x20 | Transfer-priority     |
  8158.                        |  6  | 0x40 | Full screen editor    |
  8159.                        |  7  | 0x80 | Quiet mode            |
  8160.                        +-----+------+-----------------------+
  8161.  
  8162.                For more information on using and setting bit-mapped flags,
  8163.                please see the entry entitled "BITMAPED FLAGS" in the glossary of
  8164.                this manual.
  8165.  
  8166.                Note that this variable is only available under systems that
  8167.                produce and EXITINFO.BBS format door information file.
  8168.  
  8169.  
  8170. OpenDoors Door Toolkit Manual - Version 4.10                       Page 132
  8171.  
  8172.  
  8173.  
  8174.  
  8175.  
  8176.  
  8177. --------------------------------------------------------------------------------
  8178. user_          unsigned char od_control.user_attrib2;
  8179. attrib2
  8180.                See the user_attrib variable for more information. This variable
  8181.                is like the user_attrib variable, except that it contains
  8182.                different information. The bit-mapped flags for the
  8183.                od_control.user_attrib2 variable are as follows:
  8184.  
  8185.                        +-----+------+-----------------------+
  8186.                        | BIT | MASK | DESCRIPTION           |
  8187.                        +-----+------+-----------------------+
  8188.                        |  0  | 0x01 | User hot-keys setting |
  8189.                        |  1  | 0x02 | Is AVATAR graphics on |
  8190.                        |  2  | 0x04 | Full screen reader    |
  8191.                        |  3  | 0x08 | Hidden from userlist  |
  8192.                        +-----+------+-----------------------+
  8193.  
  8194.                Note that this variable is only available under systems that
  8195.                produce an EXITINFO.BBS door information file.
  8196.  
  8197.  
  8198.  
  8199. --------------------------------------------------------------------------------
  8200. user_avatar    char od_control.user_avatar;
  8201.  
  8202.                This variable is a boolean value indicating whether or not AVATAR
  8203.                graphics mode is on. If AVATAR graphics is available, then many
  8204.                of the OpenDoors door driver functions will make use of AVATAR
  8205.                graphics codes for greater display speed. If AVATAR graphics mode
  8206.                is on, a [AVT] indicator will appear on the status line. If your
  8207.                door is running under a system which produces an RA 1.00+ style
  8208.                extended EXITINFO.BBS door information file, the user_avatar
  8209.                variable is set automatically. If the extended EXITINFO.BBS file
  8210.                is not available, this value will default to FALSE. In this case,
  8211.                you may wish to ask the user whether or not they wish to use
  8212.                AVATAR graphics, and thus set this variable yourself.
  8213.  
  8214.  
  8215.  
  8216. --------------------------------------------------------------------------------
  8217. user           char od_control.user_birthday[9];
  8218. _birthday
  8219.                This variable is a string, in the same format as the
  8220.                od_control.user_lastcall variable, which stores the date of the
  8221.                user's birthday, if it is available. This variable is only
  8222.                available under systems that produce an RA 1.00 and later style
  8223.                extended EXITINFO.BBS or Wildcat style DOOR.SYS file.
  8224.  
  8225.  
  8226.  
  8227. --------------------------------------------------------------------------------
  8228. user           char od_control.user_callsign[12];
  8229. _callsign
  8230.  
  8231.  
  8232. OpenDoors Door Toolkit Manual - Version 4.10                       Page 133
  8233.  
  8234.  
  8235.  
  8236.                This variable is a string which contains the user's amateur radio
  8237.                call sign, if any. This variable is only available under systems
  8238.                that produce a CHAIN.TXT file.
  8239.  
  8240.  
  8241.  
  8242. --------------------------------------------------------------------------------
  8243. user_combined  unsigned char od_control.user_combinedrecord[25];
  8244. record
  8245.                This variable is an array of bit-mapped flags, with each flag
  8246.                corresponding to an individual message area. In this case, the
  8247.                first bit of od_control.ra_combinedrecord[0] corresponds to the
  8248.                first message area, the second bit to the second message area,
  8249.                and so on. If any given bit-flag is turned on, then the user has
  8250.                corresponding message area enabled for combined access, and if
  8251.                the bit is turned off, the user does not have the area enabled
  8252.                for combined access. A detailed description of the combined
  8253.                message access is beyond the scope of this manual. This variable
  8254.                is only available under systems that produce an RA 1.00 or later
  8255.                style extended EXITINFO.BBS door information file.
  8256.  
  8257.  
  8258.  
  8259. --------------------------------------------------------------------------------
  8260. user_comment   char od_control.user_comment[81];
  8261.  
  8262.                This variable is a string which contains the sysop's comment
  8263.                about the user that is currently online. This comment may be
  8264.                displayed on the OpenDoors status line, if this variable is
  8265.                available. This variable is available under systems that produce
  8266.                an RA 1.00 and later style extended EXITINFO.BBS or Wildcat style
  8267.                DOOR.SYS file.
  8268.  
  8269.  
  8270.  
  8271. --------------------------------------------------------------------------------
  8272. user_credit    unsigned int od_control.user_credit;
  8273.  
  8274.                This variable contains the total amount of NetMail credit that
  8275.                the caller has left. Changes to this variable will be by the BBS
  8276.                when your door exits and control is returned to the BBS. This
  8277.                variable is only available under systems that produce an
  8278.                EXITINFO.BBS door information file.
  8279.  
  8280.  
  8281.  
  8282. --------------------------------------------------------------------------------
  8283. user_          char od_control.user_dataphone[13];
  8284. dataphone
  8285.                This string contains the user's data or business phone number, if
  8286.                available. This value is only available under system that produce
  8287.                EXITINFO.BBS, PC-Board/GAP style DOOR.SYS and WildCat DOOR.SYS
  8288.                format door information files.
  8289.  
  8290.  
  8291.  
  8292.  
  8293.  
  8294. OpenDoors Door Toolkit Manual - Version 4.10                       Page 134
  8295.  
  8296.  
  8297.  
  8298. --------------------------------------------------------------------------------
  8299. user           int od_control.user_deducted_time;
  8300. _deducted
  8301. _time          This variable contains a signed integer value, which indicates
  8302.                the total amount of time that has been decuted from the user
  8303.                during this call. This variable is only available under systems
  8304.                that produce an RA 1.00 and later style extended EXITINFO.BBS
  8305.                door information file.
  8306.  
  8307.  
  8308.  
  8309. --------------------------------------------------------------------------------
  8310. user_downk     unsigned int od_control.user_downk;
  8311.  
  8312.                This variable contains the total kilobytes of files that the
  8313.                current user has downloaded from the BBS, and is available under
  8314.                systems that produce EXITINFO.BBS, Wildcat style DOOR.SYS or
  8315.                SFDOORS.DAT format door information files.
  8316.  
  8317.  
  8318.  
  8319. --------------------------------------------------------------------------------
  8320. user           unsigned int od_control.user_downlimit;
  8321. _downlimit
  8322.                This variable contains the total number of kilobytes that the
  8323.                caller is permitted to download during this call. If your door
  8324.                allows files do be downloaded, you will probably want to compare
  8325.                the value of this variable to the size of any file to be
  8326.                transferred and the total kilobytes already downloaded, as stored
  8327.                in the od_control.user_todayk variable. This variable is only
  8328.                available under systems that produce an EXITINFO.BBS file.
  8329.  
  8330.  
  8331.  
  8332. --------------------------------------------------------------------------------
  8333. user           unsigned int od_control.user_downloads;
  8334. _downloads
  8335.                This variable contains the total number of files that the current
  8336.                user has downloaded from the BBS, and is available under systems
  8337.                that produce EXITINFO.BBS, PC-Board/GAP style DOOR.SYS, WildCat
  8338.                style DOOR.SYS or SFDOORS.DAT format door information files.
  8339.  
  8340.  
  8341.  
  8342. --------------------------------------------------------------------------------
  8343. user_echo      char od_control.user_echomailentered;
  8344. mailentered
  8345.                This variable is a boolean value, indicating whether or not the
  8346.                user has entered new EchoMail during this call. If this variable
  8347.                has a value of TRUE, then EchoMail has been entered, and if it
  8348.                has a value of FALSE, then EchoMail has not been entered. This
  8349.                variable will contain a valid value only after od_init() or some
  8350.                OpenDoors door driver function has been called. Any changes made
  8351.                to this variable will be reflected within the BBS software when
  8352.                control is returned to the BBS. This variable is accessible only
  8353.  
  8354.  
  8355.  
  8356. OpenDoors Door Toolkit Manual - Version 4.10                       Page 135
  8357.  
  8358.  
  8359.  
  8360.                under systems which produce an EXITINFO.BBS door information
  8361.                file.
  8362.  
  8363.  
  8364.  
  8365. --------------------------------------------------------------------------------
  8366. user_error          char od_control.user_error_free;
  8367. _free
  8368.                This variable contains a boolean value indicating whether or not
  8369.                the user is connected to the BBS via an error free connection
  8370.                (eg. a V.42/MNP or similar modem protocol). This variable is only
  8371.                available under systems that produce an SFDOORS.DAT, Wildcat
  8372.                style DOOR.SYS or RA 1.00 or later style extended EXITINFO.BBS
  8373.                door information file.
  8374.  
  8375.  
  8376.  
  8377. --------------------------------------------------------------------------------
  8378. user_first          char od_control.user_firstcall[9];
  8379. call
  8380.                This variable is a string which contains the date of the user's
  8381.                first call, in the same format as the od_control. user_lastcall
  8382.                variable. This variable is only available under systems which
  8383.                produce an RA 1.00 and later style extended EXITINFO.BBS door
  8384.                information file.
  8385.  
  8386.  
  8387.  
  8388. --------------------------------------------------------------------------------
  8389. user_          unsigned char od_control.user_flags[4];
  8390. flags
  8391.                The od_control.user_flags variable is an array of four sysop
  8392.                defined bit-mapped flags, which represent some sort of
  8393.                information about the user. od_control.user_flags[0] stores flags
  8394.                A1 - A8 in bits 0 through 7, respectively. Likewise,
  8395.                od_control.user_flags[1] stores flags B1 - B8, and so on. This
  8396.                variable is only available under systems that produce
  8397.                EXITINFO.BBS format door information files.
  8398.  
  8399.  
  8400.  
  8401. --------------------------------------------------------------------------------
  8402. user_handle    char od_control.user_handle[36];
  8403.  
  8404.                This variable contains the user's alias or handle name, if any.
  8405.                If the user does not have and alias or handle, this variable will
  8406.                be blank. This variable is only available under systems that
  8407.                produce a CHAIN.TXT, RA 1.00 and later extended EXITINFO.BBS or
  8408.                Wildcat style DOOR.SYS door information file.
  8409.  
  8410.  
  8411.  
  8412. --------------------------------------------------------------------------------
  8413. user_          char od_control.user_homephone[13];
  8414. homephone
  8415.  
  8416.  
  8417.  
  8418. OpenDoors Door Toolkit Manual - Version 4.10                       Page 136
  8419.  
  8420.  
  8421.  
  8422.                This string contains the user's home or data phone number, if
  8423.                available. This value is only available under system that produce
  8424.                one of the following door information files: EXITINFO.BBS, PC-
  8425.                Board/GAP style DOOR.SYS, WildCat style DOOR.SYS or SFDOORS.DAT.
  8426.  
  8427.  
  8428.  
  8429. --------------------------------------------------------------------------------
  8430. user           unsigned char od_control.user_last_pwdchange;
  8431. _last
  8432. _pwdchange     This variable contains the number of calls that the user has
  8433.                made since they last changed their password. This variable is
  8434.                only available under EXITINFO.BBS files.
  8435.  
  8436.  
  8437.  
  8438. --------------------------------------------------------------------------------
  8439. user           char od_control.user_lastdate[9];
  8440. _lastdate
  8441.                This variable is a string containing the date of the user's last
  8442.                call to the BBS, and should always be of the format:
  8443.  
  8444.                                   "MM-DD-YY"
  8445.  
  8446.                Where MM is two digits representing the number of the month of
  8447.                the user's call, with 1 being January, 2 being February, and so
  8448.                on. DD should be two digits representing the day of the month of
  8449.                the user's last call, beginning with 1, and MM should be the last
  8450.                two digits of the year of the user's last call.
  8451.  
  8452.                This variable is only available under systems that produce one of
  8453.                the following door information files: CHAIN.TXT, EXITINFO.BBS,
  8454.                PC-Board/GAP style DOOR.SYS or WildCat style DOOR.SYS files.
  8455.  
  8456.  
  8457.  
  8458. --------------------------------------------------------------------------------
  8459. user_          unsigned int od_control.user_lastread;
  8460. lastread
  8461.                This variable contains the number of the highest message number
  8462.                that the user has read, and is only available under EXITINFO.BBS
  8463.                format door information files.
  8464.  
  8465.  
  8466.  
  8467. --------------------------------------------------------------------------------
  8468. user           char od_control.user_lasttime[6];
  8469. _lasttime
  8470.                This variable contains a string representing the time of the
  8471.                user's last call to the BBS, and should always be of the format:
  8472.  
  8473.                                   "HH:MM"
  8474.  
  8475.                Where HH is two digits representing the 24-hour format hour of
  8476.                the user's last call, and MM is two digits representing the
  8477.  
  8478.  
  8479.  
  8480. OpenDoors Door Toolkit Manual - Version 4.10                       Page 137
  8481.  
  8482.  
  8483.  
  8484.                minute of the user's last call. Thus, the following strings would
  8485.                be valid entries for this string:
  8486.  
  8487.                     "00:01"    (12:01 am)
  8488.                     "03:47"    (3:47 am)
  8489.                     "18:20"    (6:20 pm)
  8490.  
  8491.                This variable is only available under systems that produce an
  8492.                EXITINFO.BBS or Wildcat style DOOR.SYS format door information
  8493.                file.
  8494.  
  8495.  
  8496.  
  8497. --------------------------------------------------------------------------------
  8498. user           char od_control.user_location[26];
  8499. _location
  8500.                This string contains the name of the location from which the
  8501.                current user is calling from. This will usually be the name of
  8502.                the city, region (province, state, etc.) and sometimes country
  8503.                where the user lives. The contents of this variable are displayed
  8504.                on the OpenDoors status line. The value of this variable is valid
  8505.                after od_init() or any other OpenDoors door driver function has
  8506.                been called. Also, you may change the value of this variable if
  8507.                you wish. However, not that these changes may not immediately be
  8508.                reflected in the status line, and may or may not cause the
  8509.                setting to be changed after the user returns to the BBS. This
  8510.                variable is available under systems that produce one of the
  8511.                following door information files: DORINFO?.DEF, EXITINFO.BBS, PC-
  8512.                Board/GAP style DOOR.SYS, WildCat style DOOR.SYS SFDOORS.DAT and
  8513.                CALLINFO.BBS, but is not available under CHAIN.TXT or DoorWay
  8514.                style DOOR.SYS files.
  8515.  
  8516.  
  8517.  
  8518. --------------------------------------------------------------------------------
  8519. user           char od_control.caller_logindate[9];
  8520. _logindate
  8521.                This variable contains a string representing the date on which
  8522.                the current call to the BBS began. This variable is in the same
  8523.                format as the od_control.user_lastdate variable, described below.
  8524.                This variable is only available under systems which produce an
  8525.                EXITINFO.BBS file.
  8526.  
  8527.  
  8528.  
  8529. --------------------------------------------------------------------------------
  8530. user           long od_control.user_loginsec;
  8531. _loginsec
  8532.                This variable contains the user's security at login, and can be
  8533.                used to detect changes by the sysop or other programs during the
  8534.                course of the call, by comparing it's value with the
  8535.                od_control.user_security variable. This variable is only
  8536.                available under systems which produce an EXITINFO.BBS file.
  8537.  
  8538.  
  8539.  
  8540.  
  8541.  
  8542. OpenDoors Door Toolkit Manual - Version 4.10                       Page 138
  8543.  
  8544.  
  8545.  
  8546. --------------------------------------------------------------------------------
  8547. user           char od_control.user_logintime[6];
  8548. _logintime
  8549.                This variable contains a string representing the time of day at
  8550.                which the current call to the BBS began. This variable is in the
  8551.                same format as the od_control.user_lasttime variable, which is
  8552.                also described below. This variable is available under systems
  8553.                which produce an EXITINFO.BBS, a Wildcat style DOOR.SYS, or an
  8554.                SFDOORS.DAT file.
  8555.  
  8556.  
  8557.  
  8558. --------------------------------------------------------------------------------
  8559. user           char od_control.user_logonpassword[16];
  8560. _logon
  8561. password       This variable is a string which contains the user's password
  8562.                at the time at which the current call to the BBS began. This
  8563.                variable can be used to detect changes by the sysop or other
  8564.                programs to the user's password, which have taken place during
  8565.                the course of the call. In order to detect such changes, simply
  8566.                compare the contents of this string with the contents of the
  8567.                od_control.user_password variable. This variable is only
  8568.                available under systems which produce an EXITINFO.BBS format door
  8569.                information file.
  8570.  
  8571.  
  8572.  
  8573. --------------------------------------------------------------------------------
  8574. user           char od_control.user_menustack[50][9];
  8575. _menustack
  8576.                This variable is an array of 50 strings, containing the stack of
  8577.                BBS menus that have been executed, and is used to record the
  8578.                current position of the user within the BBS's menu system. Each
  8579.                string contains just the base portion of the filename of the
  8580.                menu, without the extension. The od_control.ra_menustackpointer
  8581.                variable points to the top of the menu stack. However, a complete
  8582.                discussion of the menu stack is beyond the scope of this manual.
  8583.                This variable is only available under systems that produce an RA
  8584.                1.00 and later style extended EXITINFO.BBS door information file.
  8585.  
  8586.  
  8587.  
  8588. --------------------------------------------------------------------------------
  8589. user           unsigned char od_control.user_menustackpointer;
  8590. _menustack
  8591. pointer        This variable points to the top of the current menu stack. For
  8592.                more information on the menu stack, please refer to the
  8593.                od_control.ra_menustack variable, above. This variable is only
  8594.                available under systems that produce an RA 1.00 and later style
  8595.                extended EXITINFO.BBS door information file.
  8596.  
  8597.  
  8598.  
  8599. --------------------------------------------------------------------------------
  8600. user           unsigned int od_control.user_messages;
  8601. _messages
  8602.  
  8603.  
  8604. OpenDoors Door Toolkit Manual - Version 4.10                       Page 139
  8605.  
  8606.  
  8607.  
  8608.                This variable contains a value representing the total number of
  8609.                messages that have been written by the user, and is available
  8610.                under EXITINFO.BBS or Wildcat style DOOR.SYS format door
  8611.                information files.
  8612.  
  8613.  
  8614.  
  8615. --------------------------------------------------------------------------------
  8616. user_name      char od_control.user_name[36];
  8617.  
  8618.                This string contains the name of the user that is currently on-
  8619.                line, and is used by OpenDoors to display the current user name
  8620.                on the status line, and will most likely be used by your door for
  8621.                differentiating among different users. In most cases, you should
  8622.                probably not change the value of this variable, as a user's name
  8623.                does not usually change, and doing so could results in problems
  8624.                when returning to some BBS systems. For an example of using this
  8625.                variable, see the EZVote example program. This variable is
  8626.                available under all BBS systems.
  8627.  
  8628.  
  8629.  
  8630. --------------------------------------------------------------------------------
  8631. user_net_      unsigned int od_control.user_net_credit;
  8632. credit
  8633.                This variable contains the amount of NetMail credit that the
  8634.                current user has to his or her name. This variable is only
  8635.                available under systems that produce an EXITINFO.BBS file.
  8636.  
  8637.                Note that if you wish to change the value of the user's remaining
  8638.                NetMail credit, you should use the od_control. user_credit
  8639.                variable, instead of this variable.
  8640.  
  8641.  
  8642.  
  8643. --------------------------------------------------------------------------------
  8644. user_net       char od_control.user_netmailentered;
  8645. mailentered
  8646.                This variable is a boolean value, indicating whether or not the
  8647.                user has entered new NetMail or GroupMail during this call. If
  8648.                this variable has a value of TRUE, then NetMail/GroupMail has
  8649.                been entered, and if it has a value of FALSE, then
  8650.                NetMail/GroupMail has not been entered. This variable will
  8651.                contain a valid value only after od_init() or some OpenDoors door
  8652.                driver function has been called. Any changes made to this
  8653.                variable will be reflected within the BBS software when control
  8654.                is returned to the BBS. This variable is accessible only under
  8655.                systems which produce an EXITINFO.BBS door information file.
  8656.  
  8657.  
  8658.  
  8659. --------------------------------------------------------------------------------
  8660. user_num       unsigned int od_control.user_num;
  8661.  
  8662.                This variable contains the number of the user's record in the
  8663.                user database file, where 0 is the first record. This can be
  8664.  
  8665.  
  8666. OpenDoors Door Toolkit Manual - Version 4.10                       Page 140
  8667.  
  8668.  
  8669.  
  8670.                useful for changing user settings that are not re-read by the
  8671.                BBS, such as the user's phone number or security level which
  8672.                might be altered by a call back verification door. However, the
  8673.                value of this variable itself should not be altered.
  8674.  
  8675.                This variable is available under systems which produce any of the
  8676.                following door information file formats: CHAIN.TXT, PC-Board/GAP
  8677.                style DOOR.SYS, Wildcat style DOOR.SYS SFDOORS.DAT and
  8678.                EXITINFO.BBS.
  8679.  
  8680.  
  8681.  
  8682. --------------------------------------------------------------------------------
  8683. user_          unsigned int od_control.user_numcalls;
  8684. numcalls
  8685.                This variable contains the total number of calls that the current
  8686.                user has placed to the BBS, and is available under systems that
  8687.                produce EXITINFO.BBS or PC-Board/GAP and Wildcat style DOOR.SYS
  8688.                door information files.
  8689.  
  8690.  
  8691.  
  8692. --------------------------------------------------------------------------------
  8693. user           unsigned int od_control.user_numpages;
  8694. _numpages
  8695.                The value of this variable contains the total number of times
  8696.                that the user has paged the sysop, and can be used to limit the
  8697.                number of times that the user is permitted to page the sysop.
  8698.                OpenDoors increments this variable every time that the user pages
  8699.                the sysop, via the od_page() function. This variable is used with
  8700.                all types of door information files. However, this variable will
  8701.                only reflect the value within the BBS if an EXITINFO.BBS file is
  8702.                produced. Otherwise, the variable will only contain the number of
  8703.                times that the user has paged within the door, but not the total
  8704.                number of times the user has paged. Under EXITINFO.BBS systems,
  8705.                changes to the value of this variable will be reflected within
  8706.                the BBS upon return by the DOOR.
  8707.  
  8708.  
  8709.  
  8710. --------------------------------------------------------------------------------
  8711. user           char od_control.user_password[16];
  8712. _password
  8713.                This variable contains the user's password for accessing the BBS.
  8714.                OpenDoors does not use this value itself. This variable will
  8715.                contain a valid value only after od_init() or some OpenDoors door
  8716.                driver function has been called. You may change the value of this
  8717.                variable. Note, however, that changes in this variable may or may
  8718.                not cause the setting to be changed when control returns to the
  8719.                BBS - this will depend upon the particular BBS system your door
  8720.                is running under. This variable is only available under systems
  8721.                that produce one of the following door information files:
  8722.                EXITINFO.BBS, PC-Board/GAP and Wildcat style DOOR.SYS,
  8723.                SFDOORS.DAT, and CALLINFO.BBS.
  8724.  
  8725.  
  8726.  
  8727.  
  8728. OpenDoors Door Toolkit Manual - Version 4.10                       Page 141
  8729.  
  8730.  
  8731.  
  8732.  
  8733. --------------------------------------------------------------------------------
  8734. user_pending   unsigned int od_control.user_pending;
  8735.  
  8736.                This variable represents the total value of NetMail that has been
  8737.                written by the current user, but not yet exported from the
  8738.                message base. This variable is only available under systems that
  8739.                produce an EXITINFO.BBS door information file.
  8740.  
  8741.  
  8742.  
  8743. --------------------------------------------------------------------------------
  8744. user_reason    char od_control.user_reasonforchat[78];
  8745. forchat
  8746.                This variable is a string, containing the reason for which the
  8747.                user wishes to chat with the sysop, as they entered at the time
  8748.                of paging the sysop. This variable will contain an empty string
  8749.                if the user has not paged the sysop, or if the reason the user
  8750.                wishes to chat is unknown. See also the od_control.user_wantchat
  8751.                variable. This variable is available under all BBS systems,
  8752.                regardless of what style of door information file they produce.
  8753.                However, this variable will not be passed between the door and
  8754.                BBS, and thus the user's reason for chat within the door will not
  8755.                necessarily correspond to their reason for chat outside the door.
  8756.  
  8757.  
  8758.  
  8759. --------------------------------------------------------------------------------
  8760. user           unsigned int od_control.user_screen_length;
  8761. _screen
  8762. _length        This value of this variable represents the total number of
  8763.                lines that can be displayed on the user's screen at once, and is
  8764.                usually either 24 or 25. You may wish to make use of this
  8765.                variable to allow your door to pause the display of long pieces
  8766.                of text after every screen length, in order to allow the user to
  8767.                read this information before it passes off of their screen. In
  8768.                this case, you would simply maintain a counter of the total
  8769.                number of lines displayed, and when this value reaches one less
  8770.                than the length of the user screen, display a prompt asking the
  8771.                user to whether or not they wish to continue.
  8772.  
  8773.                This variable is set to the user's setting within the BBS under
  8774.                systems that produce any of the following door information file
  8775.                formats: CHAIN.TXT, EXITINFO.BBS, PC-Board/GAP and Wildcat style
  8776.                DOOR.SYS and CALLINFO.BBS files.
  8777.  
  8778.                This variable is used by the OpenDoors door driver function,
  8779.                od_list_files(). If this variable contains a valid value,
  8780.                OpenDoors will pause the listing of files after every screen, and
  8781.                give the user the option of continuing, aborting, or disabling
  8782.                the "Continue?" prompt for the rest of the file listing. Thus, if
  8783.                you are using the od_list_files() under a system that does not
  8784.                produce one of the door information files listed above, you may
  8785.                wish to obtain the user's screen length from the user themselves.
  8786.                If the screen length is not available from the particular type of
  8787.                door information file that is found, and you do not set this
  8788.  
  8789.  
  8790. OpenDoors Door Toolkit Manual - Version 4.10                       Page 142
  8791.  
  8792.  
  8793.  
  8794.                value yourself, this variable will default to 23. If you are
  8795.                going to set the value of this variable yourself, you should do
  8796.                so after having called od_init() or some OpenDoors door driver
  8797.                function.
  8798.  
  8799.  
  8800.  
  8801. --------------------------------------------------------------------------------
  8802. user_          unsigned char od_control.user_screenwidth;
  8803. screenwidth
  8804.                This variable contains a value representing the width of the
  8805.                user's screen, and will most often be equal to 80. This variable
  8806.                is only available under systems that produce a CHAIN.TXT or RA
  8807.                1.00 and later style extended EXITINFO.BBS door information file.
  8808.  
  8809.  
  8810.  
  8811. --------------------------------------------------------------------------------
  8812. user           unsigned int od_control.user_security;
  8813. _security
  8814.                This variable contains a numerical value representing the user's
  8815.                security access level on the BBS. You may wish to use this value
  8816.                to determine wether or not the current user of your door should
  8817.                have access to certain sysop-only functions. In this case, you
  8818.                may wish to have a configuration file used by your door, in which
  8819.                the sysop may define the minimum security level for sysop access.
  8820.                You would then be able to compare this configuration setting to
  8821.                the security level stored in this variable, in order to determine
  8822.                whether or not sysop function should be available. An alternative
  8823.                method, used by the EZVote sample door, of determining whether or
  8824.                not the current user is the sysop is to compare the user's name
  8825.                with the value of the od_control.sysop_name variable. This method
  8826.                has the advantage of not requiring a configuration program, but
  8827.                the disadvantage that the door will not function correctly under
  8828.                all BBS systems, as the od_control.sysop_name variable is not
  8829.                available under all BBS systems.
  8830.  
  8831.                The od_control.user_security variable is available under BBS
  8832.                systems that produce any of the following door information file
  8833.                formats: CHAIN.TXT, EXITINFO.BBS, PC-Board/GAP and Wildcat style
  8834.                DOOR.SYS, SFDOORS.DAT or CALLINFO.BBS.
  8835.  
  8836.  
  8837.  
  8838. --------------------------------------------------------------------------------
  8839. user_sex       char od_control.user_sex;
  8840.  
  8841.                This variable contains a single character representing the gender
  8842.                of the user that is currently online. This variable will contain
  8843.                an upper-case 'F' if the user is female, and an upper-case 'M' if
  8844.                the user is male. This variable is only available under systems
  8845.                that produce a CHAIN.TXT file.
  8846.  
  8847.  
  8848.  
  8849. --------------------------------------------------------------------------------
  8850.  
  8851.  
  8852. OpenDoors Door Toolkit Manual - Version 4.10                       Page 143
  8853.  
  8854.  
  8855.  
  8856. user_subdate   char od_control.user_subdate[9];
  8857.  
  8858.                This variable is a string, in the same format as the
  8859.                od_control.user_lastdate variable, which stores the date of
  8860.                expiry of the user's subscription to the BBS. This variable is
  8861.                only available under systems which produce a PC-Board/GAP and
  8862.                Wildcat style DOOR.SYS or RA 1.00 and later style extended
  8863.                EXITINFO.BBS door information file.
  8864.  
  8865.  
  8866.  
  8867. --------------------------------------------------------------------------------
  8868. user           int od_control.user_timelimit;
  8869. _timelimit
  8870.                This variable contains the amount of time, in minutes, that the
  8871.                user has left in the door. Note that this value may or may not be
  8872.                equal to the total amount of time that the user has left on the
  8873.                BBS, depending upon whether the BBS or a third-party door manager
  8874.                program only allows a limited amount of time in this door. This
  8875.                variable contains a valid value after od_init() or some OpenDoors
  8876.                door driver function has been called. OpenDoors uses this
  8877.                variable to keep track of how much time the user has left in the
  8878.                door, and will automatically warn the user when nearly all of his
  8879.                or her time has been used up. OpenDoors will also force the user
  8880.                out of the door when their time in the door has expired.
  8881.                OpenDoors automatically subtracts one minute from this variable
  8882.                every minute that OpenDoors is active, unless chat mode has been
  8883.                activated (in which case the user's time will freeze), and also
  8884.                adjusts the value of this variable when the sysop uses the time
  8885.                adjustment function keys. Hence, you will not normally have any
  8886.                need to alter the value of this variable yourself. However, there
  8887.                may be some cases in which you wish to subtract a penalty or add
  8888.                a bonus to the user's time, such as in a "timebank" door or a
  8889.                door game that permits the user to "gamble time".
  8890.  
  8891.                Depending on which BBS system your door is running under, the
  8892.                value of this variable may or may not effect the user's time left
  8893.                upon return to the BBS. The BBS system will either reset the
  8894.                user's time to the value re-written to the door information file
  8895.                (this variable), or will always subtract the amount of time spent
  8896.                in the door from the user's remaining time. Other BBS systems,
  8897.                such as Apex, give the sysop an option of which means should be
  8898.                used.
  8899.  
  8900.                This variable is available under all door information file
  8901.                formats.
  8902.  
  8903.  
  8904.  
  8905. --------------------------------------------------------------------------------
  8906. user           unsigned int od_control.user_todayk;
  8907. _todayk
  8908.                This variable contains the total kilobytes of files that the
  8909.                current user has downloaded from the BBS during the current day,
  8910.                and is available under systems that produce EXITINFO.BBS, PC-
  8911.  
  8912.  
  8913.  
  8914. OpenDoors Door Toolkit Manual - Version 4.10                       Page 144
  8915.  
  8916.  
  8917.  
  8918.                Board/GAP and Wildcat style DOOR.SYS, or SFDOORS.DAT format door
  8919.                information files.
  8920.  
  8921.  
  8922.  
  8923. --------------------------------------------------------------------------------
  8924. user_upk       unsigned int od_control.user_upk;
  8925.  
  8926.                This variable contains the total kilobytes of files that the
  8927.                current user has uploaded to the BBS, and is available under
  8928.                systems that produce EXITINFO.BBS, Wildcat style DOOR.SYS or
  8929.                SFDOORS.DAT files.
  8930.  
  8931.  
  8932.  
  8933. --------------------------------------------------------------------------------
  8934. user_uploads   unsigned int od_control.user_uploads;
  8935.  
  8936.                This variable contains the total number of files that the current
  8937.                user has uploaded to the BBS, and is available under systems that
  8938.                produce EXITINFO.BBS, PC-Board/GAP and Wildcat style DOOR.SYS, or
  8939.                SFDOORS.DAT format door information files.
  8940.  
  8941.  
  8942.  
  8943. --------------------------------------------------------------------------------
  8944. user           char od_control.user_wantchat;
  8945. _wantchat
  8946.                This variable is a boolean value which indicates whether or not
  8947.                the user wishes to chat with the sysop (ie, the user has paged
  8948.                the sysop, but has yet to receive a chat with the sysop). This
  8949.                variable is used under all door information file formats.
  8950.                However, changes to this variable are only reflected on the BBS
  8951.                when the door is running under a system that produces an
  8952.                EXITINFO.BBS door information file.
  8953.  
  8954.                This variable is automatically turned on (ie., set to TRUE), when
  8955.                the user begins to page the sysop for chat, within the od_page()
  8956.                function, and is automatically turned off (ie., set to FALSE),
  8957.                when the sysop breaks in for chat via the chat function key.
  8958.                Also, setting this variable to TRUE will turn on the flashing
  8959.                want-chat indicator on the OpenDoors status line.
  8960.  
  8961.  
  8962. --------------------------------------------------------------------------------
  8963. user           unsigned int od_control.user_xi_record;
  8964. _xi_record
  8965.                This variable contains the number of the user's record in the
  8966.                USERXI.BBS file, if any. This variable is only available under
  8967.                system that produce a Remote Access 1.00 and later style extended
  8968.                door information file.
  8969.  
  8970.  
  8971.  
  8972.  
  8973.  
  8974.  
  8975.  
  8976. OpenDoors Door Toolkit Manual - Version 4.10                       Page 145
  8977.  
  8978.  
  8979.  
  8980.  
  8981.  
  8982.  
  8983.  
  8984. CONTROL STRUCTURE - DOOR SETTINGS
  8985. --------------------------------------------------------------------------------
  8986.  
  8987.                This section deals with those variables in the OpenDoors control
  8988.                structure which reflect the current door settings. These
  8989.                variables are as follows:
  8990.  
  8991.                od_okaytopage            Controls whether the user is currently
  8992.                                         permitted to page the sysop.
  8993.  
  8994.                od_pageendmin            End of valid paging hours.
  8995.  
  8996.                od_pagestartmin          Start of valid paging hours.
  8997.  
  8998.                od_user_keyboard_on      Controls whether OpenDoors will
  8999.                                         currently accept input from the remote
  9000.                                         user's keyboard.
  9001.  
  9002.                sysop_next               Indicates whether or not the sysop has
  9003.                                         reserved use of the system after the
  9004.                                         current calls.
  9005.  
  9006.  
  9007.  
  9008. --------------------------------------------------------------------------------
  9009. od             char od_control.od_okaytopage;
  9010. _okaytopage
  9011.                This variable allows you to control whether or not the user is
  9012.                currently permitted to page the sysop via the od_page() function.
  9013.                This variable contains one of three values. A value equal to TRUE
  9014.                indicates that paging is currently permitted. A value equal to
  9015.                FALSE indicates that paging is not current permitted. A value of
  9016.                MAYBE indicates that the od_page() function should check the
  9017.                values of the od_pagestartmin and od_pageendmin variables in
  9018.                order to determine whether or not paging should be permitted. If
  9019.                you wish to always permit sysop paging, you can simply leave this
  9020.                variable set at its default value of TRUE. On the other hand, you
  9021.                may wish to allow the sysop to configure paging hours - either
  9022.                within your own configuration program, or within the BBS's
  9023.                configuration. In this case, you can either turn paging on and
  9024.                off manually by changing the value of this variable, or by
  9025.                setting this variable to MAYBE, and using the od_pagestartmin and
  9026.                od_pageendmin variables. These two variables are described below.
  9027.                For more information on the od_page() function itself, see page
  9028.                92.
  9029.  
  9030.  
  9031.  
  9032. --------------------------------------------------------------------------------
  9033. od             unsigned int od_control.od_pageendmin;
  9034. _pageendmin
  9035.  
  9036.  
  9037.  
  9038. OpenDoors Door Toolkit Manual - Version 4.10                       Page 146
  9039.  
  9040.  
  9041.  
  9042.                This variable can be used to set the beginning of valid sysop
  9043.                paging hours within the od_page() function. If the
  9044.                od_control.od_okaytopage variable (which is described above) is
  9045.                set to MAYBE, then OpenDoors will check the value of this
  9046.                variable prior to paging the sysop via the od_page() function.
  9047.                This variable should contain the time at which the valid sysop
  9048.                paging hours end, represented as the a number of minutes since
  9049.                midnight. For more information on the od_page() function itself,
  9050.                see page 92.
  9051.  
  9052.  
  9053.  
  9054. --------------------------------------------------------------------------------
  9055. od             unsigned int od_control.od_pagestartmin;
  9056. _pagestartmin
  9057.                This variable can be used to set the beginning of valid sysop
  9058.                paging hours within the od_page() function. If the
  9059.                od_control.od_okaytopage variable (which is described above) is
  9060.                set to MAYBE, then OpenDoors will check the value of this
  9061.                variable prior to paging the sysop via the od_page() function.
  9062.                This variable should contain the time at which the valid sysop
  9063.                paging hours begin, represented as the a number of minutes since
  9064.                midnight. For more information on the od_page() function itself,
  9065.                see page 92.
  9066.  
  9067.  
  9068.  
  9069. --------------------------------------------------------------------------------
  9070. od_user        char od_control.od_user_keyboard_on;
  9071. _keyboard_on
  9072.                This variable is a boolean value, indicating whether OpenDoors
  9073.                will currently accept input from a remote user. OpenDoors
  9074.                provides a function key (usually [ALT]-[K], unless you have
  9075.                changed the default), which will allow the sysop to temporarily
  9076.                prevent the user from having any control over the door. When the
  9077.                sysop activates this feature, a flashing [Keyboard-Off] indicator
  9078.                will appear on the status line, and this variable will be set to
  9079.                FALSE. When the sysop presses the [ALT]-[K] combination a second
  9080.                time, to toggle the user's keyboard back on, the flashing
  9081.                indicator will disappear, and this variable will be set back to
  9082.                TRUE.
  9083.  
  9084.  
  9085.  
  9086. --------------------------------------------------------------------------------
  9087. sysop_next     char od_control.sysop_next;
  9088.  
  9089.                This variable is a boolean value, indicating whether or not the
  9090.                "sysop next" feature has been activated. The "sysop next"
  9091.                feature, which reserves the system for the sysop after the call
  9092.                has ended, can be toggled on and off within OpenDoors by use of a
  9093.                function key (Alt-N by default). Also, when the "sysop next"
  9094.                feature has been activated, an indicator will appear on the
  9095.                OpenDoors status line. This variable is only available under
  9096.                systems that produce an SFDOORS.DAT or RA 1.00 and later style
  9097.                extended EXITINFO.BBS door information file. For more information
  9098.  
  9099.  
  9100. OpenDoors Door Toolkit Manual - Version 4.10                       Page 147
  9101.  
  9102.  
  9103.  
  9104.                on testing the type of door information file available, please
  9105.                see page 125.
  9106.  
  9107.  
  9108.  
  9109.  
  9110.  
  9111.  
  9112.  
  9113.  
  9114.  
  9115.  
  9116.  
  9117.  
  9118.  
  9119.  
  9120.  
  9121.  
  9122.  
  9123.  
  9124.  
  9125.  
  9126.  
  9127.  
  9128.  
  9129.  
  9130.  
  9131.  
  9132.  
  9133.  
  9134.  
  9135.  
  9136.  
  9137.  
  9138.  
  9139.  
  9140.  
  9141.  
  9142.  
  9143.  
  9144.  
  9145.  
  9146.  
  9147.  
  9148.  
  9149.  
  9150.  
  9151.  
  9152.  
  9153.  
  9154.  
  9155.  
  9156.  
  9157.  
  9158.  
  9159.  
  9160.  
  9161.  
  9162. OpenDoors Door Toolkit Manual - Version 4.10                       Page 148
  9163.  
  9164.  
  9165.  
  9166.  
  9167.  
  9168.  
  9169.  
  9170. CONTROL STRUCTURE - OPENDOORS CUSTOMIZATION
  9171. --------------------------------------------------------------------------------
  9172.  
  9173.                The OpenDoors control structure provides many variables which
  9174.                allow you to customize OpenDoor's behaviour and appearance. These
  9175.                customization variables fit into one of the following categories:
  9176.  
  9177.                          General Behaviour Customization Variables
  9178.                          Sysop Function Keys Customization Variables
  9179.                          Colour Customization Variables
  9180.                          Language-Specific Prompts Customization Variables
  9181.  
  9182.                This section deals with those variables that fit into the first
  9183.                category, "General Behaviour Customization Variables". The other
  9184.                categories are dealt with in the following sections of this
  9185.                chapter.
  9186.  
  9187.                Below is a brief overview of the variables grouped into this
  9188.                section of the OpenDoors control structure. Following the
  9189.                overview is a detailed description of each of these variables.
  9190.  
  9191.  
  9192.                od_box_chars             Array of characters used by the
  9193.                                         od_draw_box() function
  9194.  
  9195.                od_before_exit           Function to call prior to exiting
  9196.  
  9197.                od_cafter_chat           Function to call after sysop chat
  9198.  
  9199.                od_cafter_shell          Function to call after DOS shell
  9200.  
  9201.                od_cbefore_chat          Function to call prior to sysop chat
  9202.  
  9203.                od_cbefore_shell         Function to call prior to DOS shell
  9204.  
  9205.                od_clear_on_exit         Controls whether the screen is cleared
  9206.                                         upon door exit
  9207.  
  9208.                od_colour_delimiter      Indicates what character should delimit
  9209.                                         imbedded colour codes for the
  9210.                                         od_printf() function.
  9211.  
  9212.                od_disable               Disable OpenDoors activities such as
  9213.                                         reading door information file and
  9214.                                         monitoring carrier detect / remaining
  9215.                                         time
  9216.  
  9217.                od_inactivity            Controls user inactivity timeout
  9218.  
  9219.                od_last_input            Indicates whether the last input came
  9220.                                         from the remote user (==0) or the local
  9221.                                         sysop (==1).
  9222.  
  9223.  
  9224. OpenDoors Door Toolkit Manual - Version 4.10                       Page 149
  9225.  
  9226.  
  9227.  
  9228.  
  9229.                od_list_pause            Controls whether or not the user may
  9230.                                         pause display within the od_list_files()
  9231.                                         and od_send_file() functions by using
  9232.                                         the [P] key.
  9233.  
  9234.                od_list_stop             Controls whether or not the user may
  9235.                                         terminate display within the
  9236.                                         od_list_files() and od_send_file()
  9237.                                         functions using [S], [CTRL]-[K], etc.
  9238.  
  9239.                od_logfile_disable       Prevents the logfile from being opened
  9240.                                         when od_log_open() is called.
  9241.  
  9242.                od_logfile_name          Contains the filename and possibly path
  9243.                                         of the logfile.
  9244.  
  9245.                od_maxtime               Indicates the maximum length of time any
  9246.                                         user is permitted to use the door.
  9247.  
  9248.                od_maxtime_deduction     Indicates the amount of time that has
  9249.                                         temporarily been taken away from the
  9250.                                         user's remaining time, as a result of
  9251.                                         the maximum door time settting.
  9252.  
  9253.                od_nocopyright           Prevents OpenDoors from displaying it's
  9254.                                         name and version number when a door
  9255.                                         program begins execution.
  9256.  
  9257.                od_noexit                Prevents OpenDoors from exiting when the
  9258.                                         od_exit() function is called
  9259.  
  9260.                od_page_len              Controls length of the sysop page beep.
  9261.  
  9262.                od_page_pausing          Enables or disables page pausing in
  9263.                                         od_send_file(), od_hotkey_menu() and
  9264.                                         od_list_files() functions.
  9265.  
  9266.                od_page_startmin         Indicates the time of day at which sysop
  9267.                                         paging is first enabled.
  9268.  
  9269.                od_page_endmin           Indicates the time of day at which sysop
  9270.                                         paging is disabled.
  9271.  
  9272.                od_spawn_freeze_time     Indicates whether the user's time
  9273.                                         remaining continues to be decreased
  9274.                                         during the execution of the
  9275.                                         od_spawn...() functions (FALSE), or if
  9276.                                         the timer should be "frozen" (TRUE).
  9277.  
  9278.                od_swapping_disable      Disables swapping during DOS shell and
  9279.                                         od_spawn...() functions
  9280.  
  9281.                od_swapping_noems        Prevents swapping form being done to EMS
  9282.                                         expanded memory.
  9283.  
  9284.  
  9285.  
  9286. OpenDoors Door Toolkit Manual - Version 4.10                       Page 150
  9287.  
  9288.  
  9289.  
  9290.                od_swapping_path         Location where disk swap file should be
  9291.                                         created.
  9292.  
  9293.                od_status_on             Controls whether the status line sub-
  9294.                                         system is active
  9295.  
  9296.  
  9297.  
  9298.  
  9299. --------------------------------------------------------------------------------
  9300. od_box         char od_control.od_box_chars[6];
  9301. _chars
  9302.                This variable allows you to specify which character the
  9303.                od_draw_box() function uses in drawing the boarder of a window.
  9304.                The elements of this array are as follows:
  9305.  
  9306.                od_control.od_box_chars[0] - Upper left corner of box
  9307.                od_control.od_box_chars[1] - Horizontal line
  9308.                od_control.od_box_chars[2] - Upper right corner of box
  9309.                od_control.od_box_chars[3] - Vertical line
  9310.                od_control.od_box_chars[4] - Lower left corner of box
  9311.                od_control.od_box_chars[5] - Lower right corner of box
  9312.  
  9313.  
  9314.  
  9315. --------------------------------------------------------------------------------
  9316. od_before      void (*od_control.od_before_exit)();
  9317. _exit
  9318.                This variable contains a pointer to a function which OpenDoors
  9319.                should call prior to exiting, or NULL if you do not wish to have
  9320.                any function called at exit time. For an example of the use of
  9321.                this variable, see the description of the EZVote demo door, which
  9322.                begins on page 25.
  9323.  
  9324.  
  9325.  
  9326. --------------------------------------------------------------------------------
  9327. od_cafter      void (*od_control.od_cafter_chat)();
  9328. _chat
  9329.                The function pointed to by this variable will be called after
  9330.                sysop chat mode has ended. This may be useful for allowing you to
  9331.                save the user's screen contents prior to chat, and restoring the
  9332.                afterwards. If this variable contains its default value of NULL,
  9333.                no function will be called. To alter the string of text which is
  9334.                displayed after sysop chat, see the od_control.od_after_chat
  9335.                variable, which is described in the section on the prompts
  9336.                customization portion of the control structure.
  9337.  
  9338.  
  9339.  
  9340. --------------------------------------------------------------------------------
  9341. od_cafter      void (*od_control.od_cafter_shell)();
  9342. _shell
  9343.                The function pointed to by this variable will be called after the
  9344.                sysop has returned from a DOS shell. If this variable contains
  9345.                its default value of NULL, no function will be called. To alter
  9346.  
  9347.  
  9348. OpenDoors Door Toolkit Manual - Version 4.10                       Page 151
  9349.  
  9350.  
  9351.  
  9352.                the string of text which is displayed after a DOS shell, see the
  9353.                od_control.od_after_shell variable, which is described in the
  9354.                section on the prompts customization portion of the control
  9355.                structure.
  9356.  
  9357.  
  9358.  
  9359. --------------------------------------------------------------------------------
  9360. od_cbefore     void (*od_control.od_cbefore_chat)();
  9361. _chat
  9362.                The function pointed to by this variable will be called prior to
  9363.                entering sysop chat mode. This may be useful for allowing you to
  9364.                save the user's screen contents prior to chat, and restoring the
  9365.                afterwards. If this variable contains its default value of NULL,
  9366.                no function will be called. To alter the string of text which is
  9367.                displayed prior to sysop chat, see the od_control.od_before_chat
  9368.                variable, which is described in the section on the prompts
  9369.                customization portion of the control structure.
  9370.  
  9371.  
  9372.  
  9373. --------------------------------------------------------------------------------
  9374. od_cbefore     void (*od_control.od_cbefore_shell)();
  9375. _shell
  9376.                The function pointed to by this variable will be called prior to
  9377.                executing a sysop DOS shell. If this variable contains its
  9378.                default value of NULL, no function will be called. To alter the
  9379.                string of text which is displayed before a DOS shell, see the
  9380.                od_control.od_before_shell variable, which is described in the
  9381.                section on the prompts customization portion of the control
  9382.                structure.
  9383.  
  9384.  
  9385.  
  9386. --------------------------------------------------------------------------------
  9387. od_clear       char od_control.od_clear_on_exit;
  9388. _on_exit
  9389.                This variable contains a boolean value, which indicates whether
  9390.                or not you wish OpenDoors to clear the screen prior to exiting.
  9391.                This variable defaults to a value of TRUE, which causes the
  9392.                screen to be cleared when a door program exits. However, you may
  9393.                wish to set this variable to a value of FALSE, which will cause
  9394.                the contents of the screen to remain unchanged when the door
  9395.                exits. While setting this variable to FALSE will probably result
  9396.                in a messy display if the door is to return control to a batch
  9397.                file, if the door returns directly to the BBS, it will result in
  9398.                a smoother transition from the door back to the BBS (as the sysop
  9399.                is not left with a blank screen). If your door has a
  9400.                configuration file or configuration program, you may wish to have
  9401.                an option which will allow the individual sysop to determine
  9402.                whether or not the screen should be cleared when the door exits.
  9403.  
  9404.  
  9405.  
  9406. --------------------------------------------------------------------------------
  9407. od_colour      char od_control.od_colour_delimiter;
  9408.  
  9409.  
  9410. OpenDoors Door Toolkit Manual - Version 4.10                       Page 152
  9411.  
  9412.  
  9413.  
  9414. _delimiter
  9415.                This variable sets the character that is used to delimit colour
  9416.                codes in the od_printf() function, and defaults to the back-quote
  9417.                (`) character. If you wish to be able to display the back-quote
  9418.                (`) character using the od_printf() function, and thus wish to
  9419.                use a different character to delimit colour codes in the
  9420.                od_printf() function, simply set this variable to the alternative
  9421.                character you wish to use. If you wish to disable the imbedded
  9422.                colour codes feature of the od_printf() function, simply set this
  9423.                variable to a value of zero. For more information on od_printf()
  9424.                imbedded colour codes, see the description of the od_printf()
  9425.                function, which begins on page 93.
  9426.  
  9427.  
  9428.  
  9429. --------------------------------------------------------------------------------
  9430. od_disable     char od_control.od_disable;
  9431.  
  9432.                This variable is a bit-mapped flag which can be used to disable
  9433.                certain OpenDoors features which are normally active, in order to
  9434.                allow for maximum customization of OpenDoors. Each bit of this
  9435.                variable represents a different feature that can be disabled. To
  9436.                DISABLE a feature, you set the bit that corresponds to the
  9437.                particular feature. To ENABLE the feature, the bit is reset. Each
  9438.                bit is represented by a keyword, as follows:
  9439.  
  9440.                DIS_INFOFILE - Setting the DIS_INFOFILE bit of the
  9441.                     od_control.od_disable variable allows you to prevent
  9442.                     OpenDoors from reading or re-writing a door information
  9443.                     file. If you wish to disable OpenDoors' reading of the door
  9444.                     information file, you must  do so prior to calling od_init()
  9445.                     or any other OpenDoors door-driver functions. At the same
  9446.                     time, you must also manually set any required variables that
  9447.                     are normally set by the information obtained from the door
  9448.                     information file, such as the comm port number, baud rate,
  9449.                     user name, and so on. You may wish to disable reading of the
  9450.                     door information file in a number of cases. For example, you
  9451.                     may wish to manually read another format of door information
  9452.                     file not supported by OpenDoors, or to obtain the necessary
  9453.                     door information from your program's command line. Also, if
  9454.                     you are using OpenDoors to write a non-door communications
  9455.                     program, such as a terminal program, you want to prevent
  9456.                     OpenDoors from attempting to read a door information file on
  9457.                     startup.
  9458.  
  9459.                DIS_CARRIERDETECT - Setting this bit allows you to prevent
  9460.                     OpenDoors from exiting when it the carrier detect signal
  9461.                     from the modem disappears. This bit may be set or rest at
  9462.                     any time. If you use this bit to disable OpenDoors' carrier
  9463.                     detection, you will probably want to monitor the state of
  9464.                     the carrier detect signal yourself, using the od_carrier()
  9465.                     function, which is described on page 34.
  9466.  
  9467.                DIS_TIMEOUT - This flag allows you to prevent OpenDoors from
  9468.                     exiting when the user runs out of time. As with the
  9469.                     DIS_CARRIERDETECT flag, you may set or reset this bit at any
  9470.  
  9471.  
  9472. OpenDoors Door Toolkit Manual - Version 4.10                       Page 153
  9473.  
  9474.  
  9475.  
  9476.                     time. You will most often want to use this setting when
  9477.                     writing a non-door program, which you would not want to have
  9478.                     exit after a particular amount of time has elapsed. Be sure
  9479.                     that you do not confuse this flag with the user's inactivity
  9480.                     timeout. To disable the inactivity timeout, set the
  9481.                     do_control.od_inactivity variable to 0.
  9482.  
  9483.                DIS_LOCAL_OVERRIDE - This variable affects OpenDoors' behaviour
  9484.                     when a locked BPS rate is specified in the configuration
  9485.                     file, and another BPS rate is specified in the door
  9486.                     information file. By default, OpenDoors will initialize the
  9487.                     modem at the BPS rate specified in the congiruation file,
  9488.                     unless the BPS rate specified in the door information file
  9489.                     is 0. In this case, the 0 BPS rate is used to indicate that
  9490.                     the door is operating in local mode, and will override the
  9491.                     BPS rate specified in the configuration file. Setting this
  9492.                     flag disables the local mode override, causing the modem to
  9493.                     always be initialized at the locked BPS rate, even when the
  9494.                     door information file specifies that local mode should be
  9495.                     used.
  9496.  
  9497.                Note that in order to disable the OpenDoors status line, the
  9498.                od_control.od_status_on variable is used, instead of the
  9499.                od_disable variable. You may also disable the user's inactivity
  9500.                timeout by setting the od_control.od_inactivity variable to 0.
  9501.                The od_control.od_status_on variable is described later in this
  9502.                section. Also note that you do not need to set this variable in
  9503.                any program that only uses the BBS interface module of OpenDoors,
  9504.                as the od_init() function is only called in programs which use
  9505.                the door driver module.
  9506.  
  9507.  
  9508.  
  9509. --------------------------------------------------------------------------------
  9510. od             unsigned int od_control.od_inactivity;
  9511. _inactivity
  9512.                The OpenDoors door driver has a built in user-inactivity timeout
  9513.                facility, which will automatically disconnect a user who appears
  9514.                .to be sleeping at the keyboard. If the user has not pressed any
  9515.                keys on their keyboard for to great a length of time, they will
  9516.                be warned that they are about to be disconnected due to
  9517.                inactivity. If they still do not respond after another few
  9518.                seconds, OpenDoors will automatically disconnect the user and
  9519.                return control to the BBS software. The od_control.od_inactivity
  9520.                variable allows you to set the maximum length of time, in
  9521.                seconds, after which the user will be disconnected for
  9522.                inactivity. This variable defaults to a value of 200 seconds. You
  9523.                may disable OpenDoors' inactivity timeout altogether, by setting
  9524.                the od_control.od_inactivity variable to a value of 0.
  9525.  
  9526.  
  9527.  
  9528. --------------------------------------------------------------------------------
  9529. od_last        char od_control.od_last_input;
  9530. _input
  9531.  
  9532.  
  9533.  
  9534. OpenDoors Door Toolkit Manual - Version 4.10                       Page 154
  9535.  
  9536.  
  9537.  
  9538.                Indicates whether the last key retrieved using the od_get_key()
  9539.                function originated from the remote user, or the local sysop. If
  9540.                the input originated from the remote, this variable is set to 0.
  9541.                If the input originated from the local keyboard, this variables
  9542.                is set to 1.
  9543.  
  9544.  
  9545.  
  9546. --------------------------------------------------------------------------------
  9547. od_list        char od_control.od_list_pause;
  9548. _pause
  9549.                This variable contains a boolean value, which allows you to
  9550.                control whether or not the user may pause displaying within the
  9551.                od_list_files() and od_send_file() function. When this variable
  9552.                is set to its default value of TRUE, the user will be able to
  9553.                pause the display by pressing the [P] key, and resume display by
  9554.                pressing any other key. However, the pause feature may be
  9555.                disabled by setting this variable to FALSE.
  9556.  
  9557.  
  9558.  
  9559. --------------------------------------------------------------------------------
  9560. od_list        char od_control.od_list_stop;
  9561. _stop
  9562.                This variable contains a boolean value, which allows you to
  9563.                control whether or not the user may abort displaying within the
  9564.                od_list_files() and od_send_file() function. When this variable
  9565.                is set to its default value of TRUE, the user will be able to
  9566.                pause the display by pressing the [S], [CTRL]-[K] or [CTRL]-[C]
  9567.                keys. However, the stop feature may be disabled by setting this
  9568.                variable to FALSE.
  9569.  
  9570.  
  9571.  
  9572. --------------------------------------------------------------------------------
  9573. od_logfile     char od_control.od_logfile_disable;
  9574. _disable
  9575.                This variable defaults to the value of FALSE, unless the
  9576.                "LogfileDisable" option is specified in the configuration file,
  9577.                in which case the variable will be set to TRUE. If this variable
  9578.                is set to TRUE, OpenDoors will not write to a logfile, even if
  9579.                the od_log_open() function is called.
  9580.  
  9581.  
  9582.  
  9583. --------------------------------------------------------------------------------
  9584. od_logfile     char od_control.od_logfile_name[80];
  9585. _name
  9586.                This variable specifies the filename, and optionally the full
  9587.                path of the logfile where OpenDoors should perform logging. This
  9588.                variable only has an effect when set prior to calling
  9589.                od_log_open() or od_log_write(). If the log file name is
  9590.                specified in the configuration file, that name will be stored in
  9591.                this variable. If you do not set this variable, and the log file
  9592.                name is not specified in the configuration file, the default name
  9593.  
  9594.  
  9595.  
  9596. OpenDoors Door Toolkit Manual - Version 4.10                       Page 155
  9597.  
  9598.  
  9599.  
  9600.                "DOOR.LOG" will be used. If you wish to set this variable, you
  9601.                should do so prior to calling the od_init_with_config() function.
  9602.  
  9603.  
  9604.  
  9605. --------------------------------------------------------------------------------
  9606. od_            unsigned int od_control.od_maxtime;
  9607. maxtime
  9608.                This variable specifies the maximum length of time that any user
  9609.                is permitted to use the door, and is normally set from a
  9610.                configuration file option. If upon entering the door, the user's
  9611.                time remaining online is greater than the od_maxtime setting,
  9612.                their time remaining is temporarily decreased to the maximum
  9613.                value. Then upon exit of the door, the number of subtracted
  9614.                minutes is added back onto the user's remaining time. If the
  9615.                user's remaining time is less than this value, then the setting
  9616.                has no effect. A value of 0 disables the maximum time setting
  9617.                altogether.
  9618.  
  9619.  
  9620.  
  9621. --------------------------------------------------------------------------------
  9622. od_maxtime     int od_control.od_maxtime_deduction;
  9623. _deduction
  9624.                This variable store the amount of time that should be added to
  9625.                the user's time upon exit of the door, as a result of the maximum
  9626.                time deduction, described above. If the maximum time feature is
  9627.                not used, this variable will be given a value of 0.
  9628.  
  9629.  
  9630.  
  9631. --------------------------------------------------------------------------------
  9632. od_            char od_control.od_nocopyright;
  9633. nocopyright
  9634.                This variable is a boolean value that allows you to prevent
  9635.                OpenDoors from displaying its name, version number and the
  9636.                copyright notice when an OpenDoors door program begins execution.
  9637.                When this variable is set to TRUE, and OpenDoors is running in
  9638.                registered mode, the OpenDoors name display will be disabled. If
  9639.                you decide that you must use this variable to remove the version
  9640.                and name display, I would appreciate it if you were to place a
  9641.                notice elsewhere indicating that your door is written with
  9642.                OpenDoors.
  9643.  
  9644.  
  9645.  
  9646. --------------------------------------------------------------------------------
  9647. od_noexit      char od_control.od_noexit;
  9648.  
  9649.                This variable contains a boolean value, which allows you to
  9650.                prevent OpenDoors from exiting when shutting down. This may be
  9651.                useful when you want to have your program to do more processing
  9652.                after you have called the od_exit() function, or if you do not
  9653.                wish to have your program exit automatically when the user drops
  9654.                carrier. Normally, this variable will default to a value of
  9655.                FALSE, indicating that OpenDoors will exit normally when the
  9656.  
  9657.  
  9658. OpenDoors Door Toolkit Manual - Version 4.10                       Page 156
  9659.  
  9660.  
  9661.  
  9662.                od_exit() function is called. However, you may optionally set
  9663.                this variable to TRUE after od_init() or some OpenDoors door
  9664.                driver function has been called. In this case, when the od_exit()
  9665.                function is called, either by your program manually, or
  9666.                automatically by OpenDoors in response to the user dropping
  9667.                carrier, etc., OpenDoors will not exit. However, the normal
  9668.                operations of closing the FOSSIL driver and re-writing the door
  9669.                information file will be carried out. If you set the od_noexit
  9670.                variable to TRUE, it will be up to your program to detect the
  9671.                closing of the door driver by the od_exit() function. The best
  9672.                way of doing this is to provide a function which is to be called
  9673.                at the beginning of the od_exit() function, by setting the
  9674.                od_control.od_before_exit pointer, described above.
  9675.  
  9676.  
  9677.  
  9678. --------------------------------------------------------------------------------
  9679. od_page        char od_control.od_page_len;
  9680. _len
  9681.                This variable allows you to control the length, in seconds, of
  9682.                the sysop page beep produced when the user pages the sysop via
  9683.                the od_page() function.
  9684.  
  9685.  
  9686.  
  9687. --------------------------------------------------------------------------------
  9688. od_page        char od_control.od_page_pausing;
  9689. _pausing
  9690.                This variable contains a Boolean value that indicates whether or
  9691.                not page pausing is enabled in the od_send_file(),
  9692.                od_hotkey_menu() and od_list_files() functions. The default value
  9693.                of TRUE indicates that page pausing is enabled. A value of FALSE
  9694.                indicates that page pausing is disabled.
  9695.  
  9696.  
  9697.  
  9698. --------------------------------------------------------------------------------
  9699. od_page        int od_control.od_pagestartmin;
  9700. startmin       int od_control.od_pageendmin;
  9701.  
  9702. od_page        These variables indicate the start and end times for sysop
  9703. endmin         paging, expressed as the number of minutes past midnight.
  9704.                Sysop paging will be available through the od_page() function
  9705.                from the start time, up to but not including the end time.
  9706.  
  9707.  
  9708.  
  9709. --------------------------------------------------------------------------------
  9710. od_spawn       char od_control.od_spawn_freeze_time;
  9711. _freeze_time
  9712.  
  9713.                This variable is a boolean value which indicates whether or not
  9714.                the user's time remaining is frozen during the execution of one
  9715.                of the od_spawn...() functions. If this variable is set to TRUE,
  9716.                the user's time remaining will not decrease during the time that
  9717.                the od_spawn...() function is executing. However, if this
  9718.  
  9719.  
  9720. OpenDoors Door Toolkit Manual - Version 4.10                       Page 157
  9721.  
  9722.  
  9723.  
  9724.                variable is set to FALSE, the user's time remaining will continue
  9725.                to be subtracted during the execution of the od_spawn...()
  9726.                function. The default value of this variable is FALSE.
  9727.  
  9728.  
  9729.  
  9730. --------------------------------------------------------------------------------
  9731. od_swapping    char od_control.od_swapping_disable;
  9732. _disable
  9733.                This variable is a boolean value which specifies whether or not
  9734.                OpenDoors will attempt to swap itself and your entire door upon
  9735.                DOS shell or a call to one of the od_spawn...() functions. This
  9736.                variable defaults to FALSE. If set to TRUE, OpenDoors will not
  9737.                attempt to perform swapping activities.
  9738.  
  9739.  
  9740.  
  9741. --------------------------------------------------------------------------------
  9742. od_swapping    char od_control.od_swapping_noems;
  9743. _noems
  9744.                This variable is a boolean value which can be used to prevent
  9745.                OpenDoors from swapping to EMS memory. This variable defaults to
  9746.                the value FALSE. If set to TRUE, OpenDoors will not attempt to
  9747.                use EMS memory for swapping, and will only swap to disk.
  9748.  
  9749.  
  9750.  
  9751. --------------------------------------------------------------------------------
  9752. od_swapping    char od_control.od_swapping_path;
  9753. _path
  9754.                This variable specifies the drive and directory where OpenDoors
  9755.                should create its disk swapping file, if applicable. More than
  9756.                one path can be specified, by seperating the paths with a semi-
  9757.                colon (;) character.
  9758.  
  9759.  
  9760.  
  9761. --------------------------------------------------------------------------------
  9762. od_status      char od_control.od_status_on;
  9763. _on
  9764.                This variable is a boolean value which allows your program to
  9765.                completely disable the OpenDoors status line. The variable
  9766.                defaults to a value of TRUE, which causes the OpenDoors status
  9767.                line to be controllable by function keys, displayed and updated
  9768.                as it would normally be. However, if this variable is set to
  9769.                FALSE, then OpenDoors will not update the status line, nor will
  9770.                it allow the status line to be re-displayed as a result of one of
  9771.                the status line ([F1] through [F10]) keys being pressed. When you
  9772.                change the value of this variable from FALSE to TRUE, OpenDoors
  9773.                will automatically redisplay the status line. Note, however, that
  9774.                the status line isn't automatically removed when the value of
  9775.                this variable is changed from TRUE to FALSE. In order to erase
  9776.                the status line after resetting the value of this variable, you
  9777.                should reset the output window to the full screen, by calling the
  9778.                function window(1,1,25,80). Then manually erase the old status
  9779.  
  9780.  
  9781.  
  9782. OpenDoors Door Toolkit Manual - Version 4.10                       Page 158
  9783.  
  9784.  
  9785.  
  9786.                line either by clearing the bottom two lines of the screen, or by
  9787.                clearing the entire screen.
  9788.  
  9789.                It is important that you do not confuse the use of this variable
  9790.                with the od_set_statusline() function, which is described on page
  9791.                113. When the status line is enabled, the sysop can change which
  9792.                status line, if any, is being displayed, using the function keys
  9793.                [F1] through [F10]. The od_set_statusline() function allows your
  9794.                program to make the same changes to the status line setting which
  9795.                the sysop can make by pressing one of the function keys. The
  9796.                status line can be removed from the screen, allowing a full 25
  9797.                lines of text to be displayed, by pressing the [F10] key, or by
  9798.                making the appropriate call to the od_set_statusline() function.
  9799.                Note, however, than when this is done, the status line is still
  9800.                enabled, and can be turned on by pressing any of the other
  9801.                function keys. On the other hand, if the status line is turned
  9802.                off using this variable (od_control.od_status_on), the status
  9803.                line sub-system will be disabled, and pressing function keys will
  9804.                not "bring it back". So, if you were writing a program where a
  9805.                status line would be undesirable - such as a non-door
  9806.                communications program, you would use the od_control.od_status_on
  9807.                variable. On the other hand, if you only wanted to temporarily
  9808.                remove the status line - say in order that all 25 lines of a door
  9809.                program's output could be viewed - while still allowing the
  9810.                status line to be turned on with the sysop function keys, you
  9811.                would use the od_set_statusline() function. For more information
  9812.                on the od_set_statusline() function, see page 113.
  9813.  
  9814.  
  9815.  
  9816.  
  9817.  
  9818.  
  9819.  
  9820.  
  9821.  
  9822.  
  9823.  
  9824.  
  9825.  
  9826.  
  9827.  
  9828.  
  9829.  
  9830.  
  9831.  
  9832.  
  9833.  
  9834.  
  9835.  
  9836.  
  9837.  
  9838.  
  9839.  
  9840.  
  9841.  
  9842.  
  9843.  
  9844. OpenDoors Door Toolkit Manual - Version 4.10                       Page 159
  9845.  
  9846.  
  9847.  
  9848.  
  9849.  
  9850.  
  9851.  
  9852.  
  9853. CONTROL STRUCTURE - FUNCTION KEYS
  9854. --------------------------------------------------------------------------------
  9855.  
  9856.                Within OpenDoors, as with most BBS software and doors, the sysop
  9857.                has access to a number of function keys, which permits the sysop
  9858.                to carry out various functions such as entering chat mode,
  9859.                hanging up on the user, shelling to DOS, and so on. (For more
  9860.                information on these function key, see page 26.) The variables in
  9861.                this section allow you to customize which keys carry out the
  9862.                standard sysop functions, allowing you to customize your door's
  9863.                interface to mimic any BBS package. By default, OpenDoors
  9864.                emulates the function keys used by the Remote Access BBS package,
  9865.                but you may choose, for example, to have your door use the key
  9866.                combinations used by PC-Board. In addition, OpenDoors provides an
  9867.                interface which allows you to add your own function keys which
  9868.                will be accepted by the door. This could allow you to add
  9869.                additional features, such as giving the sysop access to a status
  9870.                screen which displays information about your door.
  9871.  
  9872.                Many of the variables in this section are unsigned ints, which
  9873.                represent a sysop key combination such as [ALT]-[H], [F8], or
  9874.                [CTRL]-[P]. These values are in the same format as is returned by
  9875.                the Turbo C(++) / Borland C++ bioskey() function. The high-order
  9876.                byte represents the scan code of the key, and the low-order byte
  9877.                represents the ASCII value, if any, of the key combination. Note
  9878.                that a complete tutorial on these key codes is beyond the scope
  9879.                of this manual. For more information on these key codes, you
  9880.                should see the documentation on the bioskey() function, which
  9881.                accompanies your compiler. If you wish to determine the key code
  9882.                which corresponds to a particular keystroke, there is a simple
  9883.                program, listed below, which you can compile and use. This
  9884.                program will simply display the key code for any key pressed,
  9885.                until you press the [ESCape] key. So, in order to determine the
  9886.                code for [SHIFT]-[F8], you would simply run this program, press
  9887.                the [SHIFT]-[F8] key combination on your keyboard, and record the
  9888.                value displayed on your screen.
  9889.  
  9890.                          #include <bios.h>
  9891.  
  9892.                          int main(int argc, char *agv[])
  9893.                             {
  9894.                             register unsigned int keystroke=0;
  9895.  
  9896.                             while((keystroke&0xff)!=27)
  9897.                                {
  9898.                                keystroke=bioskey(0);
  9899.                                if(keystroke!=0)
  9900.                                   {
  9901.                                   printf("You pressed %u\n",keystroke);
  9902.                                   }
  9903.                                }
  9904.  
  9905.  
  9906. OpenDoors Door Toolkit Manual - Version 4.10                       Page 160
  9907.  
  9908.  
  9909.  
  9910.                             }
  9911.  
  9912.  
  9913. --------------------------------------------------------------------------------
  9914. BUILT IN       These variable allow you to customize the sysop function keys
  9915. FUNCTION       which control functions such as hanging up on the user, shelling
  9916. KEYS           to DOS, and so on. All of these variable will be assigned default
  9917.                values, which correspond to the same function keys used by the
  9918.                RemoteAccess BBS package. However, you may change the values of
  9919.                these variables in order to customize the key combinations which
  9920.                carry out these functions in your own door program. Remember that
  9921.                if you wish to change the value of any of these variables, you
  9922.                must do so after having called od_init() or some OpenDoors door
  9923.                driver function. Each of these variables contain a scan-code /
  9924.                ASCII-code combination representing a keystroke, as is described
  9925.                above. These variables are as follows:
  9926.  
  9927.                +---------------------+-----------------------------------------+
  9928.                | VARIABLE            | CORRESPONDING FUNCTION                  |
  9929.                +---------------------+-----------------------------------------+
  9930.                | od_control.         | Enter sysop chat mode                   |
  9931.                | key_chat            | (Normally [ALT]-[C]                     |
  9932.                |                     |                                         |
  9933.                | od_control.         | Invoke sysop DOS shell                  |
  9934.                | key_dosshell        | (Normally [ALT]-[J]                     |
  9935.                |                     |                                         |
  9936.                | od_control.         | Return to the BBS without hanging up    |
  9937.                | key_drop2bbs        | (Normally [ALT]-[D])                    |
  9938.                |                     |                                         |
  9939.                | od_control.         | Hangup on the user                      |
  9940.                | key_hangup          | (Normally [ALT]-[H])                    |
  9941.                |                     |                                         |
  9942.                | od_control.         | Turn off the user's keyboard            |
  9943.                | key_keyboardoff     | (Normally [ALT]-[K])                    |
  9944.                |                     |                                         |
  9945.                | od_control.         | Decreases the user's remaining time     |
  9946.                | key_lesstime        | (Normally [DOWN-ARROW])                 |
  9947.                |                     |                                         |
  9948.                | od_control.         | Lock the user out of the BBS system     |
  9949.                | key_lockout         | (Normally [ALT]-[L])                    |
  9950.                |                     |                                         |
  9951.                | od_control.         | Increases the user's remaining time     |
  9952.                | key_moretime        | (Normally [UP-ARROW])                   |
  9953.                |                     |                                         |
  9954.                | od_control.         | Array of eight function keys to set the |
  9955.                | key_status[8]       | current status line.                    |
  9956.                |                     | (Normally [F1], [F2], [F3], [F4], [F5], |
  9957.                |                     |  [F6], [F9], [F10])                     |
  9958.                |                     |                                         |
  9959.                | od_control.         | "Sysop next" toggle key                 |
  9960.                | key_sysopnext       | (Normally [ALT]-[N])                    |
  9961.                +---------------------+-----------------------------------------+
  9962.  
  9963.  
  9964.  
  9965. --------------------------------------------------------------------------------
  9966.  
  9967.  
  9968. OpenDoors Door Toolkit Manual - Version 4.10                       Page 161
  9969.  
  9970.  
  9971.  
  9972. CUSTOM         In addition to the sysop function keys built into OpenDoors, you
  9973. FUNCTION       may wish to add your own function keys to your door. For example,
  9974. KEYS           you might wish to have the [ALT]-[Z] combination display a window
  9975.                of information about your door, or you may wish to add your own
  9976.                user editor to your door, accessible through the [ALT]-[E]
  9977.                combination. The three variables:
  9978.  
  9979.                          unsigned char od_control.od_num_keys;
  9980.                          unsigned int od_control.od_hot_key[16];
  9981.                          unsigned int od_control.od_last_hot;
  9982.  
  9983.                provide your program with an interface to add your own sysop
  9984.                function keys (not accessible by the remote user) to the door you
  9985.                have written.
  9986.  
  9987.                OpenDoors allows you to define up to sixteen custom sysop
  9988.                     function keys. The key codes (as described at the beginning
  9989.                     of this section) are stored in the od_control.od_hot_key[]
  9990.                     array, and the od_control.od_num_keys variable records the
  9991.                     number of keys which have been defined. The
  9992.                     od_control.od_num_keys variable defaults to a value of 0.
  9993.                     So, in order to add your own function keys, simply place the
  9994.                     key codes for these keys in the first n elements of the
  9995.                     od_control.od_hot_key[] array, and set the
  9996.                     od_control.od_num_keys variable to the number of keys you
  9997.                     have defined. OpenDoors will then watch the keyboard for any
  9998.                     of your predefined sysop function keys being pressed. If one
  9999.                     of these keys is pressed, OpenDoors will place the key code
  10000.                     of the pressed key in the od_control.od_last_hot variable.
  10001.                     Your program will then be able to respond to one of your
  10002.                     custom function keys being pressed by checking the value of
  10003.                     the od_control.od_last_hot variable. At any time this
  10004.                     variable contains a non-zero value. If this is the case, you
  10005.                     will then be able to determine which of your function keys
  10006.                     has been pressed by checking the key code contained in this
  10007.                     variable. After taking the appropriate action for the key
  10008.                     pressed, you should be sure to reset the value of the
  10009.                     od_control.od_last_hot variable back to zero, which will
  10010.                     indicate to OpenDoors that your program has received and
  10011.                     responded to the function key which was pressed.
  10012.  
  10013.  
  10014.  
  10015.  
  10016.  
  10017.  
  10018.  
  10019.  
  10020.  
  10021.  
  10022.  
  10023.  
  10024.  
  10025.  
  10026.  
  10027.  
  10028.  
  10029.  
  10030. OpenDoors Door Toolkit Manual - Version 4.10                       Page 162
  10031.  
  10032.  
  10033.  
  10034.  
  10035.  
  10036.  
  10037.  
  10038. CONTROL STRUCTURE - COLOUR CUSTOMIZATION
  10039. --------------------------------------------------------------------------------
  10040.  
  10041.                The OpenDoors control structure variables listed in this section
  10042.                allow you to customize the colour of text displayed by several of
  10043.                the OpenDoors functions. Each of the variables in this section
  10044.                are unsigned chars, which contain the IBM-PC colour attribute of
  10045.                the colour to be displayed. For more information on these colour
  10046.                attributes, see the description of the od_set_attrib() function
  10047.                on page 105. These colour variables are listed below, along with
  10048.                a description of where each colour is used:
  10049.  
  10050.                +---------------------+-----------------------------------------+
  10051.                | VARIABLE            | WHERE COLOUR IS USED                    |
  10052.                +---------------------+-----------------------------------------+
  10053.                | od_control.         | Text typed by the sysop in chat mode    |
  10054.                | od_chat_colour1     |                                         |
  10055.                |                     |                                         |
  10056.                | od_control.         | Text typed by the user in chat mode     |
  10057.                | od_chat_colour2     |                                         |
  10058.                |                     |                                         |
  10059.                | od_control.         | File description fields in FILES.BBS    |
  10060.                | od_list_comment_col | listings                                |
  10061.                |                     |                                         |
  10062.                | od_control.         | Filename fields in FILES.BBS listings   |
  10063.                | od_list_name_col    |                                         |
  10064.                |                     |                                         |
  10065.                | od_control.         | "Missing" string in FILES.BBS listings  |
  10066.                | od_list_offline_col |                                         |
  10067.                |                     |                                         |
  10068.                | od_control.         | File size fields in FILES.BBS listings  |
  10069.                | od_list_size_col    |                                         |
  10070.                |                     |                                         |
  10071.                | od_control.         | Title fields in FILES.BBS listings      |
  10072.                | od_list_title_col   |                                         |
  10073.                +---------------------+-----------------------------------------+
  10074.  
  10075.  
  10076.  
  10077.  
  10078.  
  10079.  
  10080.  
  10081.  
  10082.  
  10083.  
  10084.  
  10085.  
  10086.  
  10087.  
  10088.  
  10089.  
  10090.  
  10091.  
  10092. OpenDoors Door Toolkit Manual - Version 4.10                       Page 163
  10093.  
  10094.  
  10095.  
  10096.  
  10097.  
  10098.  
  10099.  
  10100. CONTROL STRUCTURE - TEXT CUSTOMIZATION
  10101. --------------------------------------------------------------------------------
  10102.  
  10103.                In addition to the other aspects of OpenDoors which may be
  10104.                customized by use of the OpenDoors control structure, all of the
  10105.                text displayed by OpenDoors may also be customized. This may be
  10106.                done either to create doors with OpenDoors that use languages
  10107.                other than English, or to simply give your doors a "personal
  10108.                touch". The variables described in this section allow you to
  10109.                define what text you want to have displayed by OpenDoors at any
  10110.                time. All of these variables are pointers to strings, and are set
  10111.                to default values in the od_init() function. Thus, if you wish to
  10112.                change the string pointed to by any of these variables, you must
  10113.                do so after od_init() or some OpenDoors doordriver function has
  10114.                been called. To set any of these variables, you can simply set
  10115.                them to point to a string-constant in your program. For example,
  10116.                to set the text displayed by OpenDoors prior to a DOS shell, you
  10117.                could:
  10118.  
  10119.                od_control.od_before_shell=(char *)"\n\rJust a moment...\n\r";
  10120.  
  10121.                The chart below lists each of the text customization variables
  10122.                (without the "od_control." prefix, for the sake of brevity),
  10123.                along with their default strings.
  10124.  
  10125.                Note that some of these strings MUST always be the same length as
  10126.                their default string. You may not display longer text within
  10127.                these strings, and if you wish to display shorter text, you must
  10128.                pad the remaining space in the string with spaces, in order to
  10129.                preserve its length. Those string which must be of fixed length
  10130.                also have their length listed in the chart below. Any strings
  10131.                which have an asterisk (*) in their length column may be any
  10132.                length.
  10133.  
  10134.                Also keep in mind that any string with "printf-style" formatting
  10135.                sequences, such as "%s", must retain the same sequences in the
  10136.                same order.
  10137.  
  10138.                In addition, four of these pointers - od_after_chat,
  10139.                od_after_shell, od_before_chat and od_before_shell - can be set
  10140.                to a value of NULL. In this case, OpenDoors will not display any
  10141.                string where this variable's string is normally displayed.
  10142.  
  10143. +-----------------------+-----+----------------------------------------------+
  10144. | VARIABLE NAME         | LEN | DEFAULT VALUE                                |
  10145. +-----------------------+-----+----------------------------------------------+
  10146. | od_after_chat         |  *  | "\n\rChat mode ended...\n\r\n\r"             |
  10147. |                       |     |                                              |
  10148. | od_after_shell        |  *  | "\n\r...Thanks for waiting\n\r\n\r"          |
  10149. |                       |     |                                              |
  10150. | od_before_chat        |  *  | "\n\rSysop breaking in for chat...\n\r\n\r"  |
  10151. |                       |     |                                              |
  10152.  
  10153.  
  10154. OpenDoors Door Toolkit Manual - Version 4.10                       Page 164
  10155.  
  10156.  
  10157.  
  10158. | od_before_shell       |  *  | "\n\rPlease wait a moment...\n\r"            |
  10159. |                       |     |                                              |
  10160. | od_chat_reason        |  *  | "                          Why would you "   |
  10161. |                       |     | "like to chat?\n\r"                          |
  10162. |                       |     |                                              |
  10163. | od_continue           |  *  | "Continue? [Y/n/=]"                          |
  10164. |                       |     |                                              |
  10165. | od_continue_no        | char| 'N'                                          |
  10166. |                       |     |                                              |
  10167. | od_continue_nonstop   | char| '='                                          |
  10168. |                       |     |                                              |
  10169. | od_continue_yes       | char| 'Y'                                          |
  10170. |                       |     |                                              |
  10171. | od_day[0]             |  3  | "Sun"                                        |
  10172. |                       |     |                                              |
  10173. | od_day[1]             |  3  | "Mon"                                        |
  10174. |                       |     |                                              |
  10175. | od_day[2]             |  3  | "Tue"                                        |
  10176. |                       |     |                                              |
  10177. | od_day[3]             |  3  | "Wed"                                        |
  10178. |                       |     |                                              |
  10179. | od_day[4]             |  3  | "Thu"                                        |
  10180. |                       |     |                                              |
  10181. | od_day[5]             |  3  | "Fri"                                        |
  10182. |                       |     |                                              |
  10183. | od_day[6]             |  3  | "Sat"                                        |
  10184. |                       |     |                                              |
  10185. | od_help_text          |  80 | "  Alt: [C]hat [H]angup [L]ockout [J]Dos "   |
  10186. |                       |     | "[K]eyboard-Off [D]rop to BBS            "   |
  10187. |                       |     |                                              |
  10188. | od_help_text2         |  79 | "  OpenDoors 4.10 - (C)Copyright 1992, "     |
  10189. |                       |     | "Brian Pirie - Registered Version         "  |
  10190. |                       |     |                                              |
  10191. | od_inactivity_timeout |  *  | "User sleeping at keyboard, inactivity "     |
  10192. |                       |     | "timeout...\n\r\n\r"                         |
  10193. |                       |     |                                              |
  10194. | od_inactivity_warning |  *  | "Warning, only %d minute(s) remaining "      |
  10195. |                       |     | "today...\n\r\n\r"                           |
  10196. |                       |     |                                              |
  10197. | od_month[0]           |  3  | "Jan"                                        |
  10198. |                       |     |                                              |
  10199. | od_month[1]           |  3  | "Feb"                                        |
  10200. |                       |     |                                              |
  10201. | od_month[2]           |  3  | "Mar"                                        |
  10202. |                       |     |                                              |
  10203. | od_month[3]           |  3  | "Apr"                                        |
  10204. |                       |     |                                              |
  10205. | od_month[4]           |  3  | "May"                                        |
  10206. |                       |     |                                              |
  10207. | od_month[5]           |  3  | "Jun"                                        |
  10208. |                       |     |                                              |
  10209. | od_month[6]           |  3  | "Jul"                                        |
  10210. |                       |     |                                              |
  10211. | od_month[7]           |  3  | "Aug"                                        |
  10212. |                       |     |                                              |
  10213. | od_month[8]           |  3  | "Sep"                                        |
  10214.  
  10215.  
  10216. OpenDoors Door Toolkit Manual - Version 4.10                       Page 165
  10217.  
  10218.  
  10219.  
  10220. |                       |     |                                              |
  10221. | od_month[9]           |  3  | "Oct"                                        |
  10222. |                       |     |                                              |
  10223. | od_month[10]          |  3  | "Nov"                                        |
  10224. |                       |     |                                              |
  10225. | od_month[11]          |  3  | "Dec"                                        |
  10226. |                       |     |                                              |
  10227. | od_no_keyboard        |  10 | "[Keyboard]"                                 |
  10228. |                       |     |                                              |
  10229. | od_no_sysop           |  *  | "\n\rI'm afraid the sysop is not available " |
  10230. |                       |     | "at this time.\n\r"                          |
  10231. |                       |     |                                              |
  10232. | od_no_response        |  *  | " No response.\n\r\n\r"                      |
  10233. |                       |     |                                              |
  10234. | od_no_time            |  *  | "Sorry, you have used up your time for "     |
  10235. |                       |     | "today...\n\r\n\r"                           |
  10236. |                       |     |                                              |
  10237. | od_offline            |  10 | "[OFFLINE] "                                 |
  10238. |                       |     |                                              |
  10239. | od_paging             |  *  | "\n\rPaging Sysop for Chat"                  |
  10240. |                       |     |                                              |
  10241. | od_press_key          |  *  | "Press [Enter] to continue..."               |
  10242. |                       |     |                                              |
  10243. | od_status_line[0]     |  80 | "                                        "   |
  10244. |                       |     | "                             [Node:     "   |
  10245. |                       |     |                                              |
  10246. | od_status_line[1]     |  *  | "%s of %s at %u BPS"                         |
  10247. |                       |     |                                              |
  10248. | od_status_line[2]     |  79 | "Security:        Time:                  "   |
  10249. |                       |     | "                             [F9]=Help "    |
  10250. |                       |     |                                              |
  10251. | od_status_line[3]     |  80 | "Voice#:               Last Call    :    "   |
  10252. |                       |     | "                 First Call :           "   |
  10253. |                       |     |                                              |
  10254. | od_status_line[4]     |  79 | "Data #:               Times Called :    "   |
  10255. |                       |     | "       Age :      Birthdate :          "    |
  10256. |                       |     |                                              |
  10257. | od_status_line[5]     |  80 | "Uploads :                      Downloads"   |
  10258. |                       |     | " :                                      "   |
  10259. |                       |     |                                              |
  10260. | od_status_line[6]     |  79 | "Flags:(A):--------  (B):--------  (C):--"   |
  10261. |                       |     | "------  (D):--------                   "    |
  10262. |                       |     |                                              |
  10263. | od_status_line[7]     |  *  | "%uk, %u files"                              |
  10264. |                       |     |                                              |
  10265. | od_status_line[8]     |  80 | "Last Caller:                           T"   |
  10266. |                       |     | "otal System Calls :        [Time:     ] "   |
  10267. |                       |     |                                              |
  10268. | od_status_line[9]     |  79 | "[Printer: OFF]     [Local Screen: ON]   "   |
  10269. |                       |     | "     Next Event :                      "    |
  10270. |                       |     |                                              |
  10271. | od_status_line[10]    | <=20| "[none, errorlevel 0]"                       |
  10272. |                       |     |                                              |
  10273. | od_status_line[11]]   | <=20| "[%5.5s, errorlevel %u]"                     |
  10274. |                       |     |                                              |
  10275. | od_status_line[12]    |  80 | "Msgs posted    :           Highread :   "   |
  10276.  
  10277.  
  10278. OpenDoors Door Toolkit Manual - Version 4.10                       Page 166
  10279.  
  10280.  
  10281.  
  10282. |                       |     | "                                        "   |
  10283. |                       |     |                                              |
  10284. | od_status_line[13]    |  79 | "Netmail Credit :           Handle   :   "   |
  10285. |                       |     | "                                       "    |
  10286. |                       |     |                                              |
  10287. | od_status_line[14]    |  *  | " Reason for chat : %-60.60s"                |
  10288. |                       |     |                                              |
  10289. | od_sysop_next         |  5  | "[SN] "                                      |
  10290. |                       |     |                                              |
  10291. | od_time_left          |  10 | "%d mins   "                                 |
  10292. |                       |     |                                              |
  10293. | od_time_warning       |  *  | "Warning, only %d minute(s) remaining tod"   |
  10294. |                       |     | "ay...\n\r\n\r"                              |
  10295. |                       |     |                                              |
  10296. | od_want_chat          |  11 | "[Want-Chat]"                                |
  10297. +-----------------------+-----+----------------------------------------------+
  10298.  
  10299.  
  10300.  
  10301.  
  10302.  
  10303.  
  10304.  
  10305.  
  10306.  
  10307.  
  10308.  
  10309.  
  10310.  
  10311.  
  10312.  
  10313.  
  10314.  
  10315.  
  10316.  
  10317.  
  10318.  
  10319.  
  10320.  
  10321.  
  10322.  
  10323.  
  10324.  
  10325.  
  10326.  
  10327.  
  10328.  
  10329.  
  10330.  
  10331.  
  10332.  
  10333.  
  10334.  
  10335.  
  10336.  
  10337.  
  10338.  
  10339.  
  10340. OpenDoors Door Toolkit Manual - Version 4.10                       Page 167
  10341.  
  10342.  
  10343.  
  10344.  
  10345. --------------------------------------------------------------------------------
  10346. CHAPTER 6 - DEBUGGING OPENDOORS PROGRAMS AND GETTING HELP
  10347. --------------------------------------------------------------------------------
  10348.  
  10349.  
  10350.  
  10351.  
  10352. ABOUT THIS CHAPTER
  10353. --------------------------------------------------------------------------------
  10354.  
  10355.                This chapter is perhaps the most important section of this entire
  10356.                manual. Here, we provide detailed instructions to help you in
  10357.                tracing the source of problems in programs written with
  10358.                OpenDoors. Included in this chapter is a step-by-step OpenDoors
  10359.                troubleshooting guide and a chart listing common problems and
  10360.                their solutions. Also included in this chapter is information on
  10361.                the many means available to you for getting more help with
  10362.                OpenDoors, including the OpenDoors support BBS, the OpenDoors
  10363.                EchoMail conference, and how to get in touch with me. It is
  10364.                strongly encouraged that you take the time to read through this
  10365.                chapter.
  10366.  
  10367.  
  10368.  
  10369. TROUBLESHOOTING PROBLEMS
  10370. --------------------------------------------------------------------------------
  10371.  
  10372.                If you are experiencing difficulty with a program that you are
  10373.                writing using OpenDoors, it is suggested that you follow the
  10374.                steps listed below in order to quickly solve your problem. Also,
  10375.                be sure to check to "solutions to common problems" section of
  10376.                this manual. There are many common difficulties which people have
  10377.                with OpenDoors, that can easily be fixed using the instructions
  10378.                in the "common solutions" section. Also, if you are having
  10379.                difficulty solving a problem yourself, do not hesitate to get in
  10380.                touch with me, as I am always happy to help with any problems. In
  10381.                addition, you may find the other means of OpenDoors support
  10382.                (described latter in this chapter), invaluable in solving
  10383.                difficulties with OpenDoors.
  10384.  
  10385.                Keep in mind that most programs you write will have some "bugs"
  10386.                to begin with, and you should expect to spend at least 50% of any
  10387.                programming project tracing down and solving errors and bugs.
  10388.                While it would be nice if every program written worked correctly
  10389.                the first time, it is a fact of life that debugging is and always
  10390.                has been an important part of the software life-cycle. In fact,
  10391.                what most often separates the good programs from the bad is the
  10392.                amount of time their programmer's spend debugging and improving
  10393.                them. Unfortunately, it is difficult, if not impossible, to come
  10394.                up with a "magic formula" for debugging software. Debugging
  10395.                software is really more of an art than a science. However, there
  10396.                are some basic guidelines, which if followed, can greatly ease
  10397.                the task of software debugging.
  10398.  
  10399.  
  10400.  
  10401.  
  10402. OpenDoors Door Toolkit Manual - Version 4.10                       Page 168
  10403.  
  10404.  
  10405.  
  10406.                As with all problem solving, the secret to software debugging
  10407.                lies in obtaining as much information about the problem as
  10408.                possible. While it is sometimes possible to solve a bug by making
  10409.                intuitive changes in your program, or in re-writing a piece of
  10410.                code to solve the problem by a different means, debugging most
  10411.                often requires more of a "planned attack". This planned attack
  10412.                generally involves little more than learning as much about what
  10413.                is going wrong as possible. The first step in solving a bug
  10414.                usually lies in locating the source of the problem. Once you have
  10415.                located the problem, solving it is often a relatively simple
  10416.                procedure. In locating the source of your bug, the use of a
  10417.                software debugger, such as the one built into the Turbo C(++) /
  10418.                Borland C++ integrated development environment, can be
  10419.                invaluable.
  10420.  
  10421.                When debugging programs written with OpenDoors, you should also
  10422.                follow the steps listed below, in order to obtain more
  10423.                information related to the problem you are trying to solve:
  10424.  
  10425.                1.)  Re-read the section(s) of this manual, your Turbo C(++) /
  10426.                     Borland C++ manuals and your program's source code, which
  10427.                     apply to the problem you are experiencing.
  10428.  
  10429.                2.)  Check the solutions to common problems section below. The
  10430.                     most common problems with OpenDoors can be solved using this
  10431.                     simple chart.
  10432.  
  10433.                3.)  Check the value in the od_errno variable, which will often
  10434.                     provide vital clues as to the source of the problem. Use of
  10435.                     the od_errno variable is described in the section below.
  10436.  
  10437.                4.)  If you are still stuck, please feel more than free to get in
  10438.                     touch with me! (see the end of this chapter for information
  10439.                     on reaching me) I am always more than happy to help with any
  10440.                     OpenDoors or general programming problems!
  10441.  
  10442.  
  10443.  
  10444.  
  10445.  
  10446.  
  10447.  
  10448.  
  10449.  
  10450.  
  10451.  
  10452.  
  10453.  
  10454.  
  10455.  
  10456.  
  10457.  
  10458.  
  10459.  
  10460.  
  10461.  
  10462.  
  10463.  
  10464. OpenDoors Door Toolkit Manual - Version 4.10                       Page 169
  10465.  
  10466.  
  10467.  
  10468.  
  10469.  
  10470.  
  10471.  
  10472. SOLUTIONS TO COMMON PROBLEMS
  10473. --------------------------------------------------------------------------------
  10474.  
  10475.                Below, several common difficulties with OpenDoors are listed,
  10476.                along with suggested solutions to these problems. If you are
  10477.                experiencing any difficulty with a program that you have written
  10478.                with OpenDoors, we would suggest that you read this section
  10479.                thoroughly. Here, the common problem is listed in the left
  10480.                margin, and the solutions listed on the right portion of the
  10481.                page.
  10482.  
  10483.  
  10484. --------------------------------------------------------------------------------
  10485. PROGRAM        1.) Check that the compiler is able to locate the OpenDoors
  10486. WON'T          header file, "OPENDOOR.H". This can be accomplished either by
  10487. COMPILE        placing this header file in the same directory as your other
  10488.                header files (such as STDIO.H, etc.), or by placing the header
  10489.                file in the current directory.
  10490.  
  10491.                2.) Be sure that you are linking your program with the correct
  10492.                library for the memory model you are using. (See the section on
  10493.                compiling with OpenDoors). Also be sure that both the source code
  10494.                file for your program (such as EZVOTE.C) and the library file are
  10495.                listed in your project file, and that the project file is loaded.
  10496.                For more information on compilling programs written with
  10497.                OpenDoors, see page 20.
  10498.  
  10499.                3.) If you have tried the above solutions, and your program still
  10500.                won't compile, then the problem is most likely an error in your
  10501.                source code file. If you are unable to resolve your problem, feel
  10502.                free to get in touch with me.
  10503.  
  10504.  
  10505. --------------------------------------------------------------------------------
  10506. SCREEN         Sometimes, when compiling an OpenDoors door with some versions of
  10507. SCROLLED       Borland C++, the local screen will not be scrolled correctly. In
  10508. INCORRECTLY    this case, although everything works correctly on the remote
  10509.                screen, the bottom line will not be correctly cleared when the
  10510.                screen is scrolled. This results in scrolled lines appearing to
  10511.                be partially repeated on the screen. This problem can be remedied
  10512.                by including the following line at the beginning of the main()
  10513.                module of your door program:
  10514.  
  10515.                          directvideo=0;
  10516.  
  10517.  
  10518. --------------------------------------------------------------------------------
  10519. SCREEN         If you are using the od_clr_scr() function to clear the screen,
  10520. WILL NOT       but are not getting any results, this is likely because the user
  10521. CLEAR          online has screen clearing turned off. If you wish to force
  10522.                screen clearing regardless of the user's screen clearing settings
  10523.  
  10524.  
  10525.  
  10526. OpenDoors Door Toolkit Manual - Version 4.10                       Page 170
  10527.  
  10528.  
  10529.  
  10530.                (this is probably not a good idea), use the function call
  10531.                od_emulate(12);
  10532.  
  10533.  
  10534. --------------------------------------------------------------------------------
  10535. ALT-J KEY      If you press the Alt-J function key, but do not get any results,
  10536. DOES NOT       your problem is likely as a result of lack of memory. If enough
  10537. WORK           memory is not available to load the command processor (usually
  10538.                COMMAND.COM) when the Alt-J function key is pressed, OpenDoors
  10539.                will automatically return to the door.
  10540.  
  10541.  
  10542. --------------------------------------------------------------------------------
  10543. FIXUP          This problem was probably caused by a mismatch between your
  10544. OVERFLOW       memory model selection in your compiler, and the memory model
  10545. ERROR          library you are using. See the section on compiling programs with
  10546.                OpenDoors for more information on the correct library you should
  10547.                be using for your memory model selection.
  10548.  
  10549.  
  10550. --------------------------------------------------------------------------------
  10551. DIFFICULTY     The OpenDoors built-in terminal emulation routines, od_emulate()
  10552. COMPILING      and od_send_file() require Turbo C++ or Borland C++ in order to
  10553. WITH OLD       be compiled into your programs. You may, however, "trick" the old
  10554. VERSIONS OF    versions of Turbo C into compiling your door, by creating a
  10555. TURBO C        global variable, _wscroll. Simply place the line:
  10556.  
  10557.                      int _wscroll;
  10558.  
  10559.                at the beginning of your source code file. You will now be able
  10560.                to compile your program and use these function under old versions
  10561.                of Turbo C, however a few of the AVATAR-specific control codes
  10562.                will not always function correctly.
  10563.  
  10564.  
  10565.  
  10566.  
  10567.  
  10568.  
  10569.  
  10570.  
  10571.  
  10572.  
  10573.  
  10574.  
  10575.  
  10576.  
  10577.  
  10578.  
  10579.  
  10580.  
  10581.  
  10582.  
  10583.  
  10584.  
  10585.  
  10586.  
  10587.  
  10588. OpenDoors Door Toolkit Manual - Version 4.10                       Page 171
  10589.  
  10590.  
  10591.  
  10592.  
  10593.  
  10594.  
  10595.  
  10596. OPENDOORS SUPPORT
  10597. --------------------------------------------------------------------------------
  10598.  
  10599.                The powerful and easy to use door toolkit and BBS interface
  10600.                package, along with this comprehensive manual are only two parts
  10601.                of what make up OpenDoors. The third element of OpenDoors is the
  10602.                extensive OpenDoors support mechanisms. The OpenDoors EchoMail
  10603.                conference and support BBS each give you a chance to share ideas
  10604.                and source code with other OpenDoors programmers. You can also
  10605.                receive help learning OpenDoors or solving difficulties from the
  10606.                OpenDoors echo and BBS. In addition to these sources, I am also
  10607.                more than happy to answer any of your questions, or hear any
  10608.                suggestions for future versions of OpenDoors. The remainder of
  10609.                this chapter provides more information on the various sources of
  10610.                OpenDoors support.  Also keep your eyes open for the "OpenDoors
  10611.                Tech Journal", which will soon be available. Included in this
  10612.                newsletter will be information on OpenDoors and future versions,
  10613.                questions and answers about OpenDoors and BBS door / utility
  10614.                programming in general, sample source code, and much more.
  10615.  
  10616.  
  10617.  
  10618.  
  10619. THE OPENDOORS SUPPORT BBS
  10620. --------------------------------------------------------------------------------
  10621.  
  10622.                One of the many means of receiving OpenDoors support is via the
  10623.                OpenDoors BBS. Below is an outline of some of what is available
  10624.                from the OpenDoors BBS:
  10625.  
  10626.                     -   The newest version of this package and the OpenDoors BBS
  10627.                         interface package is always available for download.
  10628.  
  10629.                     -   Also available for download is example source code and
  10630.                         other files which you may find helpful when writing
  10631.                         programs with OpenDoors.
  10632.  
  10633.                     -   The newest list of OpenDoors distribution sites is
  10634.                         available from the BBS.
  10635.  
  10636.                     -   Access to the OpenDoors support conference where
  10637.                         OpenDoors programmers can share ideas, source code, and
  10638.                         receive help with difficulties or with learning
  10639.                         OpenDoors.
  10640.  
  10641.                     -   Get in touch with me with any questions, comments,
  10642.                         suggestions or bug reports.
  10643.  
  10644.                     -   Other files by yours truly, which may be of use in you
  10645.                         programming, such as a registration key system, and so
  10646.                         on.
  10647.  
  10648.  
  10649.  
  10650. OpenDoors Door Toolkit Manual - Version 4.10                       Page 172
  10651.  
  10652.  
  10653.  
  10654.                All users receive full access upon their first call to the
  10655.                OpenDoors BBS. The North American phone number for the support
  10656.                BBS is:
  10657.  
  10658.                                    +1 613 526 4466
  10659.  
  10660.                Note that if you are calling from outside of North America, you
  10661.                may have to add the appropriate long distance routing codes to
  10662.                the phone number. If you are having difficulty getting through to
  10663.                the BBS (ie, you get a BUSY signal), it may be best to try again
  10664.                in ten to twelve hours time. Since the BBS system is sometimes
  10665.                used for beta test purposes, it may be unavailable for several
  10666.                hours at a time. The OpenDoors support BBS also has a FidoNet
  10667.                address, 1:243/8. If you are interested in a list of files
  10668.                available from the support BBS, simply file-request "FILES". To
  10669.                receive the newest version of OpenDoors, you can file-request
  10670.                "ODOORS".
  10671.  
  10672.  
  10673.  
  10674. THE OPENDOORS ECHOMAIL CONFERENCE
  10675. --------------------------------------------------------------------------------
  10676.  
  10677.                Also available to OpenDoors users who are a member of FidoNet or
  10678.                other EMail networks is the OpenDoors EchoMail support conference
  10679.                (tag-name "OPENDOORS"). The OpenDoors support conference is
  10680.                devoted to OpenDoors and BBS door and utility programming in
  10681.                general. As with the OpenDoors support BBS, this conference gives
  10682.                people programming with OpenDoors a chance to share ideas and
  10683.                source code. It also is a forum for receiving help either
  10684.                learning OpenDoors, or with a specific difficulty. Bug reports,
  10685.                suggestions and information on future versions of OpenDoors is
  10686.                also available in the OpenDoors conference. For more information
  10687.                on the OPENDOORS echo, please feel more than free to get in touch
  10688.                with me.
  10689.  
  10690.  
  10691. GETTING IN TOUCH WITH ME
  10692. --------------------------------------------------------------------------------
  10693.  
  10694.                If you have any questions about OpenDoors, would like help with
  10695.                any programs that your are writing, or have any suggestions for
  10696.                future versions of OpenDoors, please feel free to get in touch
  10697.                with me. You can get in touch with me by any of the following
  10698.                means:
  10699.  
  10700.                -  By calling the OpenDoors support BBS. Information on the
  10701.                   support BBS is provided earlier on in this chapter.
  10702.  
  10703.  
  10704.                -  By electronic mail. My FidoNet NetMail address is:
  10705.  
  10706.                               1:243/8   ***SEE NOTE BELOW***
  10707.  
  10708.                   And my Internet address is:
  10709.  
  10710.  
  10711.  
  10712. OpenDoors Door Toolkit Manual - Version 4.10                       Page 173
  10713.  
  10714.  
  10715.  
  10716.                               brian@bpecomm.ocunix.on.ca
  10717.  
  10718.                   While I would like to be able to reply to all NetMail messages
  10719.                   by CrashMail, I am afraid I simply can not afford to do this.
  10720.                   So, if you choose to send NetMail, please indicate whether you
  10721.                   would like me to reply by routed NetMail (this may not work,
  10722.                   if routed NetMail is not available in your area), or to place
  10723.                   the message on hold for you to poll and pick up.
  10724.  
  10725.  
  10726.                -  By writing a message to me in the OpenDoors support EchoMail
  10727.                   conference. For more information on the OPENDOORS echo, see
  10728.                   the previous section of this chapter.
  10729.  
  10730.  
  10731.                -  By conventional mail. My postal address is:
  10732.  
  10733.                               Brian Pirie
  10734.                               Apt. 1416 - 2201 Riverside Dr.
  10735.                               Ottawa, Ontario
  10736.                               Canada
  10737.                               K1H 8K9
  10738.  
  10739.  
  10740.                I try to respond to all correspondences as soon as possible (ie,
  10741.                within twenty-four hours). However, it is possible that it may
  10742.                take slightly longer to reply to your message, if you are asking
  10743.                a question that requires time for me to get an answer, or if I
  10744.                happen to be away for a few days.
  10745.  
  10746.                If you are having some sort of difficulty with OpenDoors, the
  10747.                more detailed information you supply (such as source code to the
  10748.                program that is causing the problem, how to duplicate the
  10749.                problem, and so on), the more quickly I will be able to determine
  10750.                the source of your problem. Also, before you write about a
  10751.                problem with OpenDoors, you may wish to be sure that you have
  10752.                read and followed the instructions in the section on
  10753.                troubleshooting, found on page 168. While I do not mind taking
  10754.                the time to answer any questions related to OpenDoors, you may be
  10755.                able to save yourself the time of writing and waiting for a
  10756.                response - simply by following the instructions in the
  10757.                troubleshooting section. More often than not, the answer to
  10758.                questions I receive is already in this manual.
  10759.  
  10760.                If you have suggestions for enhancements or additions for future
  10761.                versions of OpenDoors, and are sending your suggestions by
  10762.                conventional mail, it would be easiest for me if you sent your
  10763.                suggestions on the suggestion form, located on page 18. If you
  10764.                have a BBS system, for which you would like to see support added,
  10765.                and either have the technical information on that BBSes
  10766.                structures, or know where I could get this information, please
  10767.                let me know.
  10768.  
  10769.  
  10770.  
  10771.  
  10772.  
  10773.  
  10774. OpenDoors Door Toolkit Manual - Version 4.10                       Page 174
  10775.  
  10776.  
  10777.  
  10778.  
  10779. OPENDOORS DISTRIBUTION SITES
  10780. --------------------------------------------------------------------------------
  10781.  
  10782.                Below is a list of sites from which the newest version of
  10783.                OpenDoors is available, as of February 25th, 1993, sorted by
  10784.                country. If you would like to join the list of official OpenDoors
  10785.                distribution systems, please see the end of this chapter.
  10786.  
  10787.                Please also keep in mind that I cannot gurantee the accuracy of
  10788.                the information in the list below. If you are having any
  10789.                difficulty contacting any of the distribution sites, please let
  10790.                me know. The only site that I can gurantee OpenDoors to be
  10791.                available from is the OpenDoors support BBS. For more information
  10792.                on the OpenDoors support BBS, please see page 172.
  10793.  
  10794.                In addition to the sites listed below, the newest verion of
  10795.                OpenDoors will likely be available from any system that carries
  10796.                "Programmer's Distribution Network" files. Also, if you send a
  10797.                self-addressed envelope, along with either a 3-1/2" or 5-1/4"
  10798.                (360K) diskette, and $2.00 to cover postage, I would be happy to
  10799.                mail the newest version of OpenDoors to you. My address is
  10800.                included in the list, below.
  10801.  
  10802.                Also, the newest version of this file is always available for
  10803.                download or file request from the OpenDoors support BBS, with the
  10804.                filename OD_SITES.ZIP.
  10805.  
  10806.  
  10807. --------------------------------------------------------------------------------
  10808. AUSTRALIA      Sydney, Australia - Rosalyn Anderson
  10809.                     Data Number : +61 2 552 3255
  10810.                     Modem       : 9600, v.32/PEP
  10811.                     Fidonet     : 3:712/618
  10812.                     Intlnet     : 58:2100/146
  10813.                     Comments    : 24 hours - log on as "opendoors user" password
  10814.                                   "doors"
  10815.  
  10816.                Sydney, Australia - Mark Laurence
  10817.                     Data Number : +61 2 938 5707
  10818.                     Modem       : 14400, v.32bis/v.42bis
  10819.                     Fidonet     : 3:714/910
  10820.                     Comments    : 24 hours, file request for nodelisted sysops
  10821.  
  10822.  
  10823. --------------------------------------------------------------------------------
  10824. CANADA         Lancaster Park, Alberta, Canada - Thomas King
  10825.                     Data Number : +1 403 973 6311
  10826.                           Modem : 16800, v.32bis/HST/v.42bis
  10827.                         Fidonet : 1:342/49
  10828.                            IMEX : 89:701/513
  10829.                        Worldnet : 62:3200/50
  10830.                        Comments : Freq by Magic name ODOORS 23hrs/day
  10831.                                   Guest Name "Visiting Sysop" PW is "PhoneBill"
  10832.  
  10833.                Saint John, New Brunswick, Canada - George Hannah
  10834.  
  10835.  
  10836. OpenDoors Door Toolkit Manual - Version 4.10                       Page 175
  10837.  
  10838.  
  10839.  
  10840.                     Data Number : +1 506 652 7292
  10841.                           Modem : 14400, v.32bis/v.42bis
  10842.                         Fidonet : 1:255/7
  10843.                        Comments : Freq ODOORS, except during ZMH
  10844.                                   Login as OPENDOORS password GUEST
  10845.  
  10846.                Ottawa, Ontario, Canada - Brian Pirie
  10847.                     Data Number : +1 613 526 4466
  10848.                     Modem       : 9600, v.32/v.42bis
  10849.                     Fidonet     : 1:243/8   *** SEE PAGE 173 ***
  10850.                     Internet    : brian@bpecomm.ocunix.on.ca
  10851.                     Postal addr : Brian Pirie
  10852.                                   1416 - 2201 Riverside Drive
  10853.                                   Ottawa, Ontario
  10854.                                   Canada
  10855.                                   K1H 8K9
  10856.                     Comments    : Freq and BBS available 24 hours / day to
  10857.                                   everyone
  10858.  
  10859.                Mascouche, Quebec, Canada - Robert La Ferte
  10860.                     Data Number : +1 514 968 1709
  10861.                     Modem       : 14400, v.32bis/v.42bis
  10862.                     Fidonet     : 1:167/235
  10863.                     Comments    : BBS opened 24 hours a day, 7 days/week,
  10864.                                   file request OPENDOORS for the latest version
  10865.  
  10866.  
  10867. --------------------------------------------------------------------------------
  10868. ITALY          Trieste, Italy - Pietro Budicin
  10869.                     Data Number : +39 40 3783111
  10870.                           Modem : 14400, v.32bis/HST/v.42bis
  10871.                         Fidonet : 2:333/603
  10872.                        Comments : Freq ODOORS and BBS 24hrs/day
  10873.  
  10874.  
  10875. --------------------------------------------------------------------------------
  10876. UNITED         Cambridge, United Kingdom - Marcel Cook
  10877. KINGDOM             Data Number : +44 223 301487
  10878.                           Modem : 14400, v.32bis
  10879.                         Fidonet : 2:440/34
  10880.                        Comments : 24 hours for callers and file requests
  10881.  
  10882.                Ipswich, Suffolk, United Kingdon - Mark Clark
  10883.                     Data Number : +44 473 692882
  10884.                           Modem : 14400, v.32bis/v.42bis
  10885.                         Fidonet : 2:440/107
  10886.                        Comments : 24 Hours/Freqs Instant Registration
  10887.  
  10888.                Mildenhall, Suffolk, United Kingdom - Dale Elrod
  10889.                     Data Number : +44 638 718623
  10890.                           Modem : 16800, v.32bis/HST/v.42bis
  10891.                         Fidonet : 2:440/37
  10892.                        Comments : 23 hours a day,
  10893.                                   magic name of OPENDOORS to get latest version
  10894.                                   online.
  10895.  
  10896.  
  10897.  
  10898. OpenDoors Door Toolkit Manual - Version 4.10                       Page 176
  10899.  
  10900.  
  10901.  
  10902.  
  10903. --------------------------------------------------------------------------------
  10904. UNITED         San Jose, California, USA - Darryl Perry
  10905. STATES              Data Number : +1 408 265 4660
  10906.                     Modem       : 9600, v.32/v.42bis
  10907.                     Fidonet     : 1:143/324
  10908.                     Comments    : Freq the full filename only.
  10909.  
  10910.                San Ramon, California, USA - Brent Johnson
  10911.                     Data Number : +1 510 830 4616
  10912.                     Modem       : 14400, v.32bis/HST
  10913.                     Fidonet     : 1:161/610
  10914.                     Comments    : 23 hours, FREQ almost anytime if listed in
  10915.                                   nodelist.
  10916.  
  10917.                Columbus, Georgia, USA - Scott Burkett
  10918.                     Data Number : +1 706 596 8126
  10919.                     Modem       : 9600, v.32
  10920.                     Fidonet     : 1:3613/12
  10921.                     Comments    : 24 Hour Operation and FREQ's
  10922.  
  10923.                Baltimore, Maryland, USA - Mike Gurski
  10924.                     Data Number : +1 410 256 1979
  10925.                     Modem       : 14400, v.32bis/v.42bis
  10926.                     Fidonet     : 1:261/1062
  10927.                     Echonet     : 50:5410/1062
  10928.                     Comments    : 24 hour FREQs, unlisted systems welcome
  10929.  
  10930.                Muskogee, Oklahoma, USA - Vince Jacobs
  10931.                     Data Number : +1 918 687 1612
  10932.                     Modem       : 14400, v.32bis/v.42bis
  10933.                     Fidonet     : 1:3813/309
  10934.                     DoorNet     : 75:7918/200
  10935.                     Comments    : 24 Hours, FREQ hours anytime but ZMH,
  10936.                                   Guest Log In as The Inspector, password Gadget
  10937.  
  10938.  
  10939.  
  10940.  
  10941.  
  10942.  
  10943.  
  10944.  
  10945.  
  10946.  
  10947.  
  10948.  
  10949.  
  10950.  
  10951.  
  10952.  
  10953.  
  10954.  
  10955.  
  10956.  
  10957.  
  10958.  
  10959.  
  10960. OpenDoors Door Toolkit Manual - Version 4.10                       Page 177
  10961.  
  10962.  
  10963.  
  10964. JOINING THE DISTRIBUTION NETWORK
  10965. --------------------------------------------------------------------------------
  10966.  
  10967.                Essentially, the OpenDoors Distribution Network is a list of
  10968.                "official" OpenDoors distribution sites that will be distributed
  10969.                with future versions of OpenDoors, and anyone is welcome to
  10970.                participate. The idea behind the "OpenDoors distribution network"
  10971.                is simply to make it easier for you, the OpenDoors programmer, to
  10972.                obtain OpenDoors updates. While the newest version of OpenDoors
  10973.                is always available from the OpenDoors Support BBS, and often
  10974.                from any system carrying the "Programmer's Distribution Network",
  10975.                most OpenDoors programmers would find it useful to know of a
  10976.                system closer to them where the newest version of OpenDoors is
  10977.                always available. Although I would like to be able to send the
  10978.                newest version of OpenDoors to any support site, the cost of
  10979.                doing so unfortunately makes this impossible. However, it is
  10980.                likely that you would pick up the newest version of OpenDoors
  10981.                when it is available anyhow, so this shouldn't really make any
  10982.                difference. So, if you are interested in becoming an official
  10983.                OpenDoors distribution site, simply fill in the form below, and
  10984.                send it to me, either electronically or by conventional mail at
  10985.                one of the addresses listed on page 173.
  10986.  
  10987.  
  10988.  
  10989.  
  10990.  
  10991.  
  10992.  
  10993.  
  10994.  
  10995.  
  10996.  
  10997.  
  10998.  
  10999.  
  11000.  
  11001.  
  11002.  
  11003.  
  11004.  
  11005.  
  11006.  
  11007.  
  11008.  
  11009.  
  11010.  
  11011.  
  11012.  
  11013.  
  11014.  
  11015.  
  11016.  
  11017.  
  11018.  
  11019.  
  11020.  
  11021.  
  11022. OpenDoors Door Toolkit Manual - Version 4.10                       Page 178
  11023.  
  11024.  
  11025.  
  11026.  
  11027. OPENDOORS OFFICIAL DISTRIBUTION SITE APPLICATION FORM
  11028. -----------------------------------------------------
  11029.  
  11030. YOUR NAME :         ________________________________________
  11031.                     (eg. Brian Pirie)
  11032.  
  11033. LOCATION :          ________________________________________
  11034.                     (eg. Ottawa, Ontario, Canada)
  11035.  
  11036. DATA NUMBER(S) :    ________________________________________
  11037.                     (eg. (613) 526-4466)
  11038.  
  11039. NETWORK ADDRESSES:  ________________________________________
  11040.                     (eg. 1:243/8 in FidoNet)
  11041.  
  11042. MODEM TYPE:         ________________________________________
  11043.                     (eg. 9600, V32bis, v42bis, HST)
  11044.  
  11045. OTHER INFORMATION:  ________________________________________
  11046.  
  11047.                     ________________________________________
  11048.                     (eg. Hours of BBS operation, file request hours,
  11049.                     guest login and password, etc.)
  11050.  
  11051.  
  11052. I CAN BE INFORMED OF NEW RELEASES BY:
  11053.          ____
  11054.         |    |  - ***ROUTED*** FIDONET NETMAIL
  11055.         |____|
  11056.          ____
  11057.         |    | - OPENDOORS SUPPORT CONFERENCE
  11058.         |____|
  11059.          ____
  11060.         |    | - OTHER: ________________________________
  11061.         |____|
  11062.  
  11063.  
  11064.  
  11065.  
  11066.  
  11067.  
  11068.  
  11069.  
  11070.  
  11071.  
  11072.  
  11073.  
  11074.  
  11075.  
  11076.  
  11077.  
  11078.  
  11079.  
  11080.  
  11081.  
  11082.  
  11083.  
  11084. OpenDoors Door Toolkit Manual - Version 4.10                       Page 179
  11085.  
  11086.  
  11087.  
  11088. --------------------------------------------------------------------------------
  11089. APPENDIX A - CONTENTS OF ARCHIVE
  11090. --------------------------------------------------------------------------------
  11091.  
  11092.  
  11093.  
  11094.  
  11095.                OpenDoors is usually distributed in the form of a single,
  11096.                compressed archive file. Thus, you should have received this
  11097.                version of OpenDoors in a file who's name began with ODOORS41.
  11098.                The files listed below should be included in your OpenDoors
  11099.                package. If any of these files are missing, you will probably
  11100.                want to look for the most recent version of OpenDoors from
  11101.                another source.
  11102.  
  11103.                Also, as of OpenDoors 4.00, each file contains the same date and
  11104.                time. The time listed in a file's directory entry represents the
  11105.                version number it belongs to, and it's date is the date of that
  11106.                version's release. Hence, a file with a time of 4:10 is part of
  11107.                OpenDoors 4.10. This is intended to help in distinguishing
  11108.                between a file that is part of the current version of OpenDoors,
  11109.                and one that is part of an older version.
  11110.  
  11111.                DOOR TESTING DROP FILE
  11112.                     DORINFO1.DEF   Sample door info file for testing doors
  11113.  
  11114.                MISCELLANEOUS EXAMPLE DOORS
  11115.                     EX_HELLO.C     Demonstrates how simple a door can be
  11116.                     EX_MUSIC.C     Example of ANSI music in OpenDoors
  11117.  
  11118.                EZVOTE TUTORIAL DOOR
  11119.                     EZVOTE.C       Source code to the sample door program
  11120.                     EZVOTE.EXE     Sample door program, EZVote
  11121.                     EZVOTE.CFG     Sample OpenDoors configuration file
  11122.  
  11123.                THE LIBRARY FILES
  11124.                     ODOORS.LIB     Small memory model library
  11125.                     ODOORC.LIB     Compact memory model library
  11126.                     ODOORM.LIB     Medium memory model library
  11127.                     ODOORL.LIB     Large memory model library
  11128.                     ODOORH.LIB     Huge memory model library
  11129.  
  11130.                THE HEADER FILE
  11131.                     OPENDOOR.H     OpenDoors #include .Header file
  11132.  
  11133.                OPENDOORS DOCUMENATION
  11134.                     ORDER.FRM      Easy-to-print order form
  11135.                     OPENDOOR.DOC   OpenDoors programmer's manual; this file
  11136.  
  11137.  
  11138.  
  11139.  
  11140.  
  11141.  
  11142.  
  11143.  
  11144.  
  11145.  
  11146. OpenDoors Door Toolkit Manual - Version 4.10                       Page 180
  11147.  
  11148.  
  11149.  
  11150. --------------------------------------------------------------------------------
  11151. APPENDIX B - OPENDOORS HISTORY
  11152. --------------------------------------------------------------------------------
  11153.  
  11154.  
  11155.  
  11156.  
  11157.                This section of the manual is a brief history of the additions
  11158.                and enhancements that OpenDoors has gone through in the process
  11159.                of getting to where it is today. OpenDoors is constantly being
  11160.                improved and upgraded, and almost all of the changes are made in
  11161.                response to requests by current users of OpenDoors. In fact,
  11162.                almost every reasonable request to date has been implemented in
  11163.                the current version of OpenDoors. (If you are a registered user
  11164.                of OpenDoors, do you notice where some of your own suggestions
  11165.                have been implemented?) If you are upgrading from a previous
  11166.                version of OpenDoors, this history list will also help you to
  11167.                identify what new features are available in this version.
  11168.  
  11169.  
  11170. VERSION 1.00   Initial beta test version of the OpenDoors doordriver. Proved to
  11171.                be very bug-free.
  11172.  
  11173.  
  11174. VERSION 1.10   Many features have been improved upon and added since version
  11175.                1.00.
  11176.  
  11177.  
  11178. VERSION 1.20   Made several changes:
  11179.                     - Support for the new RemoteAccess 1.00 enhanced
  11180.                       exitinfo.bbs file, with many extra pieces of information.
  11181.  
  11182.                     - Added a Alt-K function key to allow the sysop to
  11183.                       temporarily disable the user's keyboard
  11184.  
  11185.                     - Added full support for turning on and off status line.
  11186.                       Status line has been changed slightly in format, and [F9]
  11187.                       help function key added.
  11188.  
  11189.                     - Improved sysop chat mode (added multi-colour and wordwrap)
  11190.  
  11191.                     - Fixed up shell-to-DOS to automatically shell to the
  11192.                       command processor specified in COMSPEC instead of always
  11193.                       using COMMAND.COM. OpenDoors now also returns to system to
  11194.                       the drive and directory it was in before DOS shell was
  11195.                       issued.
  11196.  
  11197.                     - Added support for the new RemoteAccess "sysop next" key.
  11198.  
  11199.  
  11200. VERSION 1.30   A few quick changes to perfect all the features of this version
  11201.                before beginning major development work on OpenDoors 2.00. Fixed
  11202.                two problems:
  11203.                     - The status line can no longer be turned back on by the
  11204.                       sysop using F1 - F9 keys when a door program has disable
  11205.                       the status line itself.
  11206.  
  11207.  
  11208. OpenDoors Door Toolkit Manual - Version 4.10                       Page 181
  11209.  
  11210.  
  11211.  
  11212.  
  11213.                     - A rather major problem was fixed for use of OpenDoors in
  11214.                       conjunction with RA 1.00. We accidentally forgot to save
  11215.                       some of the data that is unused in previous versions, but
  11216.                       is now used in the new version. This bug caused some
  11217.                       unexpected problems, including damage to the USERSXI.BBS
  11218.                       file.
  11219.  
  11220.  
  11221. VERSION 1.40   Another maintenance release. This version should now function
  11222.                perfectly when used in conjunction with older versions of Turbo
  11223.                C. Other changes in this version include:
  11224.                     - Better error recovery in the case that the door
  11225.                       information file has been damaged.
  11226.  
  11227.                     - OpenDoors was made more customizable, including allowing
  11228.                       the programmer to alter the various OpenDoors messages,
  11229.                       and provisions for user defined function keys for the
  11230.                       sysop. (ie, it is now possible for the programmer to make
  11231.                       Alt-Y another hotkey for the sysop)
  11232.  
  11233.  
  11234. VERSION 2.00   Another release, adding a number of new features, such as:
  11235.                     - Added support for AVATAR graphics. OpenDoors will
  11236.                       automatically detect the presence of AVATAR graphics mode
  11237.                       when running under Remote Access, and will allow your door
  11238.                       to toggle it when running under other BBS systems.
  11239.  
  11240.                     - Improved ANSI routines. Added some new functions, and
  11241.                       changed existing functions to send more efficient ANSI
  11242.                       codes in some circumstances.
  11243.  
  11244.                     - The "Sysop Next" key should now work correctly with RA
  11245.                       1.00 and later.
  11246.  
  11247.  
  11248. VERSION 2.10   Changes in this version include:
  11249.                     - Implementation of a registration key-code to allow
  11250.                       registered users to more easily upgrade to new versions.
  11251.  
  11252.                     - Added an od_printf() function for ease of formatted output
  11253.                       from within OpenDoors.
  11254.  
  11255.  
  11256. VERSION 2.20   More improvements, including:
  11257.                     - Fixing of some minor bugs, such as incorrect handling of
  11258.                       the path to DORINFO1.DEF/EXITINFO.BBS files.
  11259.  
  11260.                     - Added support for more customization, such as hooks for
  11261.                       functions that will be called before and after Shell to
  11262.                       DOS and sysop chat.
  11263.  
  11264.                     - OpenDoors is now DesqView aware. OpenDoors will
  11265.                       automatically detect the presence of DesqView, and uses
  11266.                       the DesqView `virtual screen buffer' for screen display if
  11267.                       present.
  11268.  
  11269.  
  11270. OpenDoors Door Toolkit Manual - Version 4.10                       Page 182
  11271.  
  11272.  
  11273.  
  11274.  
  11275.                     - A QuickBBS 2.75 compatibility problem has also been fixed.
  11276.  
  11277.  
  11278. VERSION 2.30   Fixed a small bug in the registration system.
  11279.  
  11280.  
  11281. VERSION 3.00   A major upgrade, released as a beta-test version, including the
  11282.                following additions/changes:
  11283.                     - Eliminated many bugs.
  11284.  
  11285.                     - Added support for door information files from: WWIV, PC-
  11286.                       Board, Spitfire, WildCat, GAP, TriTel and others.
  11287.  
  11288.                     - Added .ASC/.ANS/.AVT file display support with automatic
  11289.                       interpretation of QBBS/SuperBBS/RA control characters.
  11290.  
  11291.                     - Added ALT-D key to drop the user back to the BBS without
  11292.                       hanging up.
  11293.  
  11294.                     - Added direct access to RA style configuration, file area,
  11295.                       message area, external protocols, event configuration,
  11296.                       caller history, users online, menu files, user base and
  11297.                       other system files.
  11298.  
  11299.                     - Added complete set of message base manipulation routines,
  11300.                       with full support for the RA 1.01 message base locking
  11301.                       scheme.
  11302.  
  11303.                     - The user manual has also been re-written in order to make
  11304.                       it easier to work with.
  11305.  
  11306.  
  11307. VERSION 3.10   The following bug fixes and changes have been made since the
  11308.                release of the beta version, 3.00:
  11309.                     - Time fields in messages are now correctly formatted
  11310.  
  11311.                     - Corrected a bug in the od_set_attrib function where the
  11312.                       intensity setting would not correctly be transmitted to
  11313.                       the remote when using ANSI graphics.
  11314.  
  11315.                     - Fixed a bug in the re-writing of the DORINFO1.DEF which
  11316.                       cause sysop and user's last names to be corrupted.
  11317.  
  11318.                     - Registered users may now disable the display of copyright
  11319.                       and registration information when the door starts up.
  11320.  
  11321.  
  11322. VERSION 3.20   A few more changes and bug fixes were made since version 3.10,
  11323.                including:
  11324.                     - Fixed the FILES.BBS lister to correctly support FILES.BBS
  11325.                       files located in directories other than the default dir,
  11326.                       and added page pausing to the FILES.BBS lister.
  11327.  
  11328.  
  11329. VERSION 3.30   The following changes and bug fixes were made since version 3.20:
  11330.  
  11331.  
  11332. OpenDoors Door Toolkit Manual - Version 4.10                       Page 183
  11333.  
  11334.  
  11335.  
  11336.                     - OpenDoors no longer re-writes the DORINFO1.DEF upon
  11337.                       exiting. No BBS's are known to actually make use of the
  11338.                       information changed in DORINFO1.DEF, and re-writing this
  11339.                       file was causing more troubles than it was worth.
  11340.  
  11341.                     - The od_msg_read_hdr() function's NEXT_MESSAGE command now
  11342.                       works correctly.
  11343.  
  11344.                     - Added an od_errno variable to assist in debugging of
  11345.                       programs written with the BBS file engine portion of
  11346.                       OpenDoors.
  11347.  
  11348.  
  11349. VERSION 3.40   A minor upgrade version, with the following changes:
  11350.                     - Fixed a compatibility problem with some locked baud rates.
  11351.                       Now, if OpenDoors receives a baud rate the door
  11352.                       information file that is not supported in the FOSSIL
  11353.                       definitions, it will continue without setting the baud
  11354.                       rate. (Whereas before, OpenDoors would report an error and
  11355.                       exit.)
  11356.  
  11357.                     - Made some changes to the manual, and included a utility to
  11358.                       remove the extended-ASCII characters from the manual to
  11359.                       ease printing on some printers.
  11360.  
  11361.  
  11362. VERSION 4.00   This version is a major overhaul of the entire OpenDoors package,
  11363.                including a great many enhancements and additions. As of version
  11364.                4.00, OpenDoors is available as two separate packages - the door
  11365.                programming toolkit (this package), and the BBS interface package
  11366.                (which is available separately) Among the major changes to
  11367.                version 4.00 of the OpenDoors door programming toolkit are:
  11368.                     - A complete re-organization of the manual, including the
  11369.                       re-writing of a large portion of the manual. In order to
  11370.                       ease printing on some printers, the manual has been re-
  11371.                       formatted in order that it no longer contains extended
  11372.                       ASCII characters. More thorough documentation on the
  11373.                       OpenDoors functions and structures was written, along with
  11374.                       the addition of many more examples. Also added to the
  11375.                       manual are an index, glossary and other features intended
  11376.                       to make the reference manual an even more powerful and
  11377.                       flexible tool.
  11378.  
  11379.                     - Full support for the changes to RemoteAccess 1.10/1.11 has
  11380.                       been added for version 4.00. These include the addition of
  11381.                       some new fields stored in the EXITINFO.BBS door
  11382.                       information file, and proper adjusting of the user's time
  11383.                       remaining online. Version 4.00 also now has full support
  11384.                       for the new QuickBBS-specific EXITINFO.BBS file.
  11385.  
  11386.                     - All of the text displayed by OpenDoors is now fully
  11387.                       customizable using od_control structure variables. This
  11388.                       permits both greater door customization, and adds the
  11389.                       ability to write 100% non-English doors and programs.
  11390.  
  11391.  
  11392.  
  11393.  
  11394. OpenDoors Door Toolkit Manual - Version 4.10                       Page 184
  11395.  
  11396.  
  11397.  
  11398.                     - The OpenDoors status lines have been changed. OpenDoors
  11399.                       now provides additional user information through multiple
  11400.                       RemoteAccess-style status lines, accessible through the
  11401.                       F2, F3, etc. keys. Also, the status line may now be turned
  11402.                       off by using the F10 key, allowing the sysop to view all
  11403.                       25-lines of the information displayed by a door program. A
  11404.                       new function od_set_statusline(), permits program
  11405.                       selection of the current status line setting.
  11406.  
  11407.                     - OpenDoors now allows colour codes to be embedded in
  11408.                       od_printf() functions, to eliminate the need for long
  11409.                       chains of alternating od_disp_str(), od_set_colour() /
  11410.                       od_set_attrib() function calls.
  11411.  
  11412.                     - A new formatted input function, od_edit_str() has been
  11413.                       added for use in door programs running in ANSI or AVATAR
  11414.                       graphics mode. The od_edit_str() function features
  11415.                       advanced line editing capabilities which are normally
  11416.                       found only in non-door programs, such as inserting or
  11417.                       deleting text from the middle of a string, moving the
  11418.                       cursor with the arrow keys, and so on. The od_edit_str()
  11419.                       function also provides input formatting, allowing you to
  11420.                       force the user's input into any format you wish, from
  11421.                       phone number formats to date formats to username formats.
  11422.                       The od_edit_str() also provides special modes for
  11423.                       implementing features such as password input, field input
  11424.                       (where the user may move from one field to another using
  11425.                       arrow/tab keys), input field highlighting, editing
  11426.                       existing strings, auto-delete, and much more. The old
  11427.                       od_input_str() function still provides a subset of these
  11428.                       features which do not require ANSI or AVATAR graphics.
  11429.  
  11430.                     - New functions have been added to the door driver module of
  11431.                       OpenDoors. Among these, are an od_putch() function for
  11432.                       displaying one character at a time, and an od_spawn()
  11433.                       function, for easily executing other programs from within
  11434.                       OpenDoors. The od_spawn() function automatically saves the
  11435.                       contents of the current door screen, system drive and
  11436.                       directory, and provides a separate screen on which the
  11437.                       spawned-to program can execute. The od_draw_box() function
  11438.                       allows you to easily display windows in door programs,
  11439.                       using ANSI or AVATAR graphics codes. Also added is are
  11440.                       od_carrier(), od_set_statusline() and od_edit_str()
  11441.                       functions, mentioned elsewhere.
  11442.  
  11443.                     - More changes have been made in order to permit greater
  11444.                       customization and flexibility of OpenDoors. An
  11445.                       od_carrier() function has been added to detect the state
  11446.                       of the carrier detect signal in programs that disable
  11447.                       OpenDoor's internal carrier detection. Also, it is now
  11448.                       possible to shut down OpenDoors without exiting via the
  11449.                       od_exit() function.
  11450.  
  11451.                     - OpenDoors now yeilds the processor to other executing
  11452.                       tasks in multitasking environments (ie. DesqView), when
  11453.                       the door is inactive or waiting for input.
  11454.  
  11455.  
  11456. OpenDoors Door Toolkit Manual - Version 4.10                       Page 185
  11457.  
  11458.  
  11459.  
  11460.  
  11461.                     - The door driver function od_clr_scr() now only checks the
  11462.                       user's screen clearing setting if that information is
  11463.                       available from the door information file. If the
  11464.                       information is not available, the od_clr_scr() function
  11465.                       will always clear the screen.
  11466.  
  11467.                     - Many other small changes were also made for version 4.00.
  11468.                       Among these, you now have access to the user's reason for
  11469.                       chat and you can switch the pause and stop keys on and off
  11470.                       during listing of available files or displaying a text
  11471.                       file. Also, previous versions of OpenDoors would read the
  11472.                       user's information from the first door information file
  11473.                       found. Instead, version 4.00 now reads the most recently
  11474.                       created door information file. A bug in the od_clr_line()
  11475.                       function has also been fixed.
  11476.  
  11477.  
  11478. VERSION 4.10   A great deal of work has been done between version 4.00 and 4.10
  11479.                of OpenDoors. This work falls into three major categories: bug
  11480.                fixes, improved performance, and new features. In fact, enough
  11481.                changes and improvements have been made that this version really
  11482.                ought to be numbered 5.00. Below is a summary of the changes that
  11483.                have occurred since version 4.00:
  11484.                     - Much of the door information file interfacing code has
  11485.                       been revamped, in order that OpenDoors now works correctly
  11486.                       with the newest versions of the BBS packages it supports.
  11487.                       OpenDoors now differentiates between three different
  11488.                       DOOR.SYS formats - the DoorWay format, the PC-Board / GAP
  11489.                       format, and the Wildcat format. Also, the SFDOORS.DAT code
  11490.                       has been fixed to correctly work with the newest version
  11491.                       of Spitfire.
  11492.  
  11493.                     - OpenDoors will now attempt to swap itself and your entire
  11494.                       door program to expanded memory or disk when the sysop
  11495.                       shells to DOS, or when you call one of the od_spawn...()
  11496.                       functions. Memory swapping may be configured in a number
  11497.                       of ways, or even disabled. The OpenDoors swapping code
  11498.                       adds only 2K to the door's .EXE file size.
  11499.  
  11500.                     - OpenDoors now includes a new od_spawnvpe() function. In
  11501.                       addition to the features of the "quick-spawn" od_spawn()
  11502.                       function, od_spawnvpe() also returns the errorlevel the
  11503.                       called program returned, allows you to alter the
  11504.                       environment passed to the child process, and uses the same
  11505.                       parameter format as the C spawnvpe() function. (see page
  11506.                       117)
  11507.  
  11508.                     - The od_page() function now checks the sysop paging hours,
  11509.                       set in the OpenDoors control structure. If the user
  11510.                       attempts to page the sysop outside of the defined paging
  11511.                       hours, he or she will be notified that the sysop is not
  11512.                       available.
  11513.  
  11514.                     - OpenDoors now includes a configuration file sub-system
  11515.                       that you may choose to include in your OpenDoors programs.
  11516.  
  11517.  
  11518. OpenDoors Door Toolkit Manual - Version 4.10                       Page 186
  11519.  
  11520.  
  11521.  
  11522.                       This sub-system automatically parses the configuration
  11523.                       file you specify, responding to any of the built-in
  11524.                       configuration commands, and passing configuration options
  11525.                       specific to your program back to you. With only a single
  11526.                       line of code on your part, this sub-system will allow
  11527.                       people running your program to configure many options such
  11528.                       as sysop paging hours, system directories, maximum time
  11529.                       within the door, etc. It also allows the sysop to provide
  11530.                       information that may not be supplied by their particular
  11531.                       BBS software, such as modem settings, the system's name
  11532.                       and so on. In addition to all these built in commands, you
  11533.                       can add your own configuration options, such as display
  11534.                       colours, registration key numbers and other information
  11535.                       needed by your program - without the need to write your
  11536.                       own configuration file parsing routines. (See page 76)
  11537.  
  11538.                     - OpenDoors now supports custom, sysop-defined door
  11539.                       information file (drop file) formats. By defining a custom
  11540.                       door information file format in the cofiguration file,
  11541.                       OpenDoors door programs can now be made to run directly
  11542.                       under BBS packages that use proprietary file formats that
  11543.                       are not directly supported by OpenDoors. (see page 78)
  11544.  
  11545.                     - In order to make doors written with OpenDoors even more
  11546.                       foolproof for the sysop to setup, an intelligent door
  11547.                       information file (drop file) locator has been added.
  11548.                       OpenDoors will automatically search for a door information
  11549.                       file in the directory specified by the configuration file,
  11550.                       the directory specified by your door's source code, the
  11551.                       current directory, and the directory pointed to by the
  11552.                       environment variables used by any of a number of BBS
  11553.                       packages.
  11554.  
  11555.                     - OpenDoors now includes a log file sub-system that you may
  11556.                       choose to include in your programs. The log file system
  11557.                       handles all access and formatting of the logfile, allowing
  11558.                       the programmer to make log file entries by simple function
  11559.                       calls such as od_write_log("User downloading file");.
  11560.                       Also, since the log file system is closely integrated with
  11561.                       the rest of OpenDoors, choosing to include the logfile
  11562.                       system in a program causes OpenDoors to automatically
  11563.                       output the most common logfile entries for events such as
  11564.                       the user paging sysop, the user hanging up, sysop chatting
  11565.                       with the user, user inactivity timeouts, and so on. (see
  11566.                       page 89)
  11567.  
  11568.                     - OpenDoors 4.00 would not always correctly turn on and off
  11569.                       high intensity or flashing colour attributes in ANSI mode.
  11570.                       The ANSI colour handling code has been reworked for
  11571.                       version 4.10, to eliminate these problems.
  11572.  
  11573.                     - An od_get_answer() function has been added, which can be
  11574.                       used to easily permit only certain keys to be pressed in
  11575.                       response to a prompt. For instance, to get a Yes/No
  11576.                       response from the user, use od_get_answer("YN"); (see page
  11577.                       66)
  11578.  
  11579.  
  11580. OpenDoors Door Toolkit Manual - Version 4.10                       Page 187
  11581.  
  11582.  
  11583.  
  11584.  
  11585.                     - A popular addition to OpenDoors 4.00 was the ability to
  11586.                       change the current display colour within od_printf()
  11587.                       format strings, using imbedded control characters.
  11588.                       However, the programmer was forced to use a rather cryptic
  11589.                       two-byte control sequence, where the second character of
  11590.                       the sequence contained an 8-bit colour attribute value. It
  11591.                       is now possible to change the display colour within
  11592.                       od_printf() by specifying the names of the desired
  11593.                       foreground and background colours, delimited by a set of
  11594.                       BACK-QUOTE (`) characters. For example:
  11595.  
  11596.           od_printf("`Red` THIS TEXT IS RED `Blue` THIS TEXT IS BLUE");
  11597.           od_printf("`Flashing bright green on dark green` AND THIS IS GREEN");
  11598.  
  11599.                       (see page 93)
  11600.  
  11601.                     - Version 4.10 would not correctly "freeze" the user's time
  11602.                       during DOS shell and sysop page operations, when the door
  11603.                       was operating under RemoteAccess 1.11. This has been
  11604.                       fixed.
  11605.  
  11606.                     - A new variable, od_spawn_freeze_time, has been added to
  11607.                       the OpenDoors control structure. When set to FALSE, the
  11608.                       user's time remaining continues to be deducted during the
  11609.                       execution of any of the od_spawn... functions. When set to
  11610.                       TRUE, the user's time remaining is frozen during the
  11611.                       execution of an od_spawn... function.
  11612.  
  11613.                     - The current directory is now correctly restored to its
  11614.                       original setting after the sysop returns from a DOS shell,
  11615.                       and after calls to the od_spawn... functions.
  11616.  
  11617.                     - A number of people were experiencing difficulty using the
  11618.                       od_edit_str() function in version 4.00. A number of
  11619.                       improvements to this function's logic have been made in an
  11620.                       attempt to make od_edit_str() more foolproof to use. Also,
  11621.                       a new flag setting, EDIT_FLAG_LEAVE_BLANK has been added.
  11622.                       However, there were a few reports of problems which we
  11623.                       were not able to reproduce. If you are still having
  11624.                       difficulty with this function, please carefully re-read
  11625.                       the section of the manual pertaining to it's use. In
  11626.                       particular, be sure that your difficulty is not resulting
  11627.                       from the flag settings you are using. If you still suspect
  11628.                       a bug in this function, please include with your bug
  11629.                       report the source code that is causing the problem.
  11630.  
  11631.                     - Page pausing within the od_send_file() and od_list_files()
  11632.                       (FILES.BBS listing routine) functions can now be disabled
  11633.                       and re-enabled by the programmer.
  11634.  
  11635.                     - The "Continue? [Y/n/=]" end of screen prompt and response
  11636.                       keys are now fully customizable.
  11637.  
  11638.                     - The od_list_files() FILES.BBS listing function now works
  11639.                       correctly in all memory models. The function has also been
  11640.  
  11641.  
  11642. OpenDoors Door Toolkit Manual - Version 4.10                       Page 188
  11643.  
  11644.  
  11645.  
  11646.                       fixed to correctly handle cases where the trailing
  11647.                       backslash is not supplied in the path parameter.
  11648.  
  11649.                     - The actual BBS line (node) number is now displayed on the
  11650.                       default status line, provided that this information is
  11651.                       supplied by the BBS software.
  11652.  
  11653.                     - It is now possible to detect whether keystrokes originated
  11654.                       from the remote or local keyboard. This is a feature that
  11655.                       is useful in some special applications, such as split-
  11656.                       screen sysop chat programs.
  11657.  
  11658.                     - Version 4.00 would not always correctly display the status
  11659.                       lines, if there was information missing from the
  11660.                       EXITINFO.BBS file. This has been fixed. In addition, the
  11661.                       "next event" information is now correctly displayed on the
  11662.                       status lines. Also, if the user's birthday is available,
  11663.                       their age will also be calculated and displayed on the
  11664.                       status line.
  11665.  
  11666.                     - If you temporarily disable inactivity timeouts, OpenDoors
  11667.                       will no longer automatically trigger and inactivity
  11668.                       timeout as soon as you re-enable this feature.
  11669.  
  11670.                     - A new function, od_hotkey_menu(), has been added to
  11671.                       facilitate displaying a menu with "hot keys". Like the
  11672.                       od_send_file() function, od_hotkey_menu() will display an
  11673.                       ASCII, ANSI or AVATAR file. However, od_hotkey_menu() also
  11674.                       allows you to pass a string listing possible hot keys. If
  11675.                       the user presses any of these keys while the menu is being
  11676.                       displayed, menu display will immediately cease, and the
  11677.                       function will return the key pressed by the user. (See
  11678.                       page 71)
  11679.  
  11680.                     - The od_send_file() (the ASCII/ANSI/AVATAR file display
  11681.                       routine) no longer sends the EOF character if it happens
  11682.                       to exist at the end of a file.
  11683.  
  11684.                     - In addition to the EZVote OpenDoors tutorial door, an
  11685.                       number of other example doors are now included in the
  11686.                       OpenDoors package.
  11687.  
  11688.                     - A few errors have been corrected in the documentation, and
  11689.                       additional information has been added about the new
  11690.                       features in this version.
  11691.  
  11692.  
  11693.  
  11694.  
  11695.  
  11696.  
  11697.  
  11698.  
  11699.  
  11700.  
  11701.  
  11702.  
  11703.  
  11704. OpenDoors Door Toolkit Manual - Version 4.10                       Page 189
  11705.  
  11706.  
  11707.  
  11708. --------------------------------------------------------------------------------
  11709. APPENDIX C - FUTURE VERSIONS
  11710. --------------------------------------------------------------------------------
  11711.  
  11712.  
  11713.  
  11714.  
  11715.                While I cannot make any promises about what features and changes
  11716.                will be seen in future versions of OpenDoors, I would like to
  11717.                take a moment to tell you a bit about some of the features you
  11718.                can expect to see in future versions of OpenDoors
  11719.  
  11720.                As you are probably already aware, OpenDoors is a constantly
  11721.                evolving package. To help meet the needs of programmers working
  11722.                with OpenDoors, nearly every idea and change that is made to the
  11723.                package results from the suggestions and comments I receive from
  11724.                the people using OpenDoors. For this reason, I will most likely
  11725.                continue to produce new versions of OpenDoors for as long as
  11726.                there is a demand and ideas for upgrades. There certainly is no
  11727.                shortage of either of this right now.
  11728.  
  11729.                Some of the features that are currently in the works for up and
  11730.                coming version of OpenDoors include:
  11731.  
  11732.                     - The OpenDoors "Multiple Personality System", which will
  11733.                       allow sysops using OpenDoors doors to select from one of
  11734.                       many status line and function key personalities. This will
  11735.                       allow OpenDoors doors to mimic the behaviour of the BBS
  11736.                       package the sysop is most familiar with.
  11737.  
  11738.                     - A built-in automatic ANSI/high-ASCII to plain-ASCII
  11739.                       conversion system.
  11740.  
  11741.                     - More advanced ANSI/AVATAR terminal routines, such as
  11742.                       screen save and restore, window scrolling, and more.
  11743.  
  11744.                     - Direct interfacing with more BBS systems, including
  11745.                       Maximus direct interfacing.
  11746.  
  11747.                     - AVATAR compression.
  11748.  
  11749.                     - Built in ANSI music support, including optional local
  11750.                       sound.
  11751.  
  11752.                     - Improvements to exisiting OpenDoors features, such as more
  11753.                       configuration file options, multiple log file formats, and
  11754.                       many smaller changes.
  11755.  
  11756.  
  11757.  
  11758.  
  11759.  
  11760.  
  11761.  
  11762.  
  11763.  
  11764.  
  11765.  
  11766. OpenDoors Door Toolkit Manual - Version 4.10                       Page 190
  11767.  
  11768.  
  11769.  
  11770. --------------------------------------------------------------------------------
  11771. APPENDIX D - SPECIAL THANKS
  11772. --------------------------------------------------------------------------------
  11773.  
  11774.  
  11775.  
  11776.  
  11777.                There are a great many people who I would like to thank, for
  11778.                their suggestions, ideas and assistance in making OpenDoors what
  11779.                it is today. In a way, I feel somewhat relucant to list people
  11780.                names, as I will no doubt forget someone important. Among those I
  11781.                would like to thank are:
  11782.  
  11783.                     - Everyone who has taken the time to register OpenDoors
  11784.  
  11785.                     - The folks in the OpenDoors EchoMail conference will all of
  11786.                       your suggestions and bug reports.
  11787.  
  11788.                     - Those people in the OpenDoors distribution network, who
  11789.                       help to make OpenDoors available to others.
  11790.  
  11791.                     - In particular I would like to thank the following people
  11792.                       for their devotion of time, in the form of suggestions,
  11793.                       bug reports, sending information, etc.:
  11794.  
  11795.                               Ron Bergeron
  11796.                               Scott Burkett
  11797.                               Mike Hartmann
  11798.                               Winfried Hirsch
  11799.                               Robert La Ferte
  11800.                               Ron Le Blanc
  11801.                               Bill Pavich
  11802.  
  11803.  
  11804.  
  11805.  
  11806.  
  11807.  
  11808.  
  11809.  
  11810.  
  11811.  
  11812.  
  11813.  
  11814.  
  11815.  
  11816.  
  11817.  
  11818.  
  11819.  
  11820.  
  11821.  
  11822.  
  11823.  
  11824.  
  11825.  
  11826.  
  11827.  
  11828. OpenDoors Door Toolkit Manual - Version 4.10                       Page 191
  11829.  
  11830.  
  11831.  
  11832. --------------------------------------------------------------------------------
  11833. GLOSSARY
  11834. --------------------------------------------------------------------------------
  11835.  
  11836. ANSI           "ANSI", often referred to as "ANSI Graphics", is a display
  11837.                protocol which allows (in this case), BBS software to perform
  11838.                certain display functions such as changing the colour of
  11839.                displayed text, or moving the location of the cursor on the
  11840.                screen. The majority, though not all, BBS users use terminal
  11841.                software with ANSI graphics capabilities. Any users that do not
  11842.                have graphics display capabilities, will be using ASCII mode,
  11843.                instead. Compare ASCII and AVATAR.
  11844.  
  11845.  
  11846. ASCII          ASCII (pronounced "ass-key") is an acronym for "American Standard
  11847.                Code for Information Interchange", and is a definition of a set
  11848.                of 128 letters, number and symbols, which can be displayed by
  11849.                computer systems. Also, when used within the domain of BBS
  11850.                software, ASCII mode is often used to refer to the lack of any
  11851.                graphics display capabilities, such as ANSI or AVATAR. When ASCII
  11852.                mode is used, characters can only be displayed in standard
  11853.                Teletype fashion, one after another. Also, colour and cursor
  11854.                positioning functions are not available in ASCII mode. Compare
  11855.                ANSI and AVATAR.
  11856.  
  11857.  
  11858. AVATAR         AVATAR is an acronym for "Advanced Video Attribute Terminal
  11859.                Assembler and Recreator". AVATAR is a graphics display protocol,
  11860.                similar to ANSI. Like ANSI-graphics, AVATAR graphics allow
  11861.                functions such as cursor positioning, and colour changing.
  11862.                However, AVATAR also offers many capabilities not available from
  11863.                ANSI, and performs the same functions as ANSI much more quickly.
  11864.                AVATAR graphics is less common than both ANSI or ASCII, but is
  11865.                becoming more popular as time goes by. Compare ASCII and ANSI.
  11866.  
  11867.  
  11868. BAUD           For our purposes, the term "baud" or "baud rate" refers to the
  11869.                speed at which data is being sent from one computer to another
  11870.                over a modem. Sometimes referred to as "BPS".
  11871.  
  11872.  
  11873. BIT-MAPPED     As with Boolean values, described below, bit mapped flags
  11874. FLAGS          are used to indicate whether or not various conditions exist.
  11875.                (For example, whether or not a certain setting is enabled, or
  11876.                whether or not a particular event has occurred.) However, unlike
  11877.                Boolean variables, a single bit-mapped flag represents more than
  11878.                one of these TRUE/FALSE values. In fact, each bit (BInary Digit),
  11879.                which makes of the variable can be used to represent a separate
  11880.                TRUE/FALSE state. (ie, each bit maps to a particular piece of
  11881.                information, and hence the term "Bit Map").
  11882.  
  11883.                For an example of using bit-mapped flags, let us take a case of a
  11884.                single "unsigned char" which contains three independent
  11885.                TRUE/FALSE values. We will call this variable user_info, and it
  11886.                will indicate whether or not a user has ANSI graphics, whether or
  11887.                not the user has screen clearing turned on, and wether or not the
  11888.  
  11889.  
  11890. OpenDoors Door Toolkit Manual - Version 4.10                       Page 192
  11891.  
  11892.  
  11893.  
  11894.                user has end-of-page "more" prompts enabled. Internally, the bits
  11895.                of the user_info variable will be as follows:
  11896.  
  11897.                      Bit:  7 6 5 4 3 2 1 0
  11898.                                      | | |
  11899.                                      | | +--- ANSI Graphics
  11900.                                      | +----- Screen Clearing
  11901.                                      +------- More prompts
  11902.  
  11903.                In this case, we will have three constants which we define in
  11904.                order to simplify access to these bit-mapped flags, as follows:
  11905.  
  11906.                      #define ANSI_GRAPHICS        0x01
  11907.                      #define SCREEN_CLEARING      0x02
  11908.                      #define MORE_PROMPTS         0x04
  11909.  
  11910.                Note that normally within OpenDoors, these constants will be
  11911.                defined for you, and you will have no need to know what their
  11912.                values are, nor in which bit which piece of information is
  11913.                stored.
  11914.  
  11915.                Using bit-mapped flags, you are able to set or clear any of the
  11916.                individual flags, and check whether any of the flags are set,
  11917.                using these simple methods: (Not that a set flag is the
  11918.                equivalent of a Boolean value of "True", and a cleared flag is
  11919.                the equivalent of a Boolean value of "False".)
  11920.  
  11921.                     Set Flag:      variable |= FLAG_CONSTANT;
  11922.                     Clear Flag:    variable &=~ FLAG_CONSTANT;
  11923.                     Test Flag:     variable & FLAG_CONSTANT
  11924.  
  11925.                Where "variable" is the name of the bit-mapped flag variable, and
  11926.                "FLAG_CONSTANT" is the pre-defined constant for the individual
  11927.                setting. To return to our example, you could turn on the user's
  11928.                ANSI graphics setting by using the line:
  11929.  
  11930.                     user_info |= ANSI_GRAPHICS;
  11931.  
  11932.                and to turn off screen clearing you would:
  11933.  
  11934.                     user_info &=~ ANSI_GRAPHICS;
  11935.  
  11936.                To perform an action (such as waiting for the user to press
  11937.                [Return]/[Enter]) only if "More" prompts are enabled, you would:
  11938.  
  11939.                     if(user_info & MORE_PROMPTS)
  11940.                          {
  11941.                          ...            /* Whatever you want */
  11942.                          }
  11943.  
  11944.  
  11945.  
  11946. BOOLEAN        Many of the variables used within OpenDoors contain a
  11947. VALUES         "Boolean Value". A Boolean value is a two-state variable, who's
  11948.                states are referred to as "True" and "False'. If the variable
  11949.                contains a value of "True", it indicates that a certain condition
  11950.  
  11951.  
  11952. OpenDoors Door Toolkit Manual - Version 4.10                       Page 193
  11953.  
  11954.  
  11955.  
  11956.                is so, and if it contains a value of "False", it indicates that
  11957.                the condition is not so. For example, a Boolean variable "wait"
  11958.                might be used to indicate whether or not OpenDoors should wait
  11959.                for the user to press a key, or continue without waiting. In this
  11960.                case, a value of "True" would indicate that OpenDoors should
  11961.                wait, and a value of "False" would indicate that it should not
  11962.                wait.
  11963.  
  11964.                Note that in the C programming language, there is no actual
  11965.                Boolean variable type - usually a char or an int are used to
  11966.                store Boolean values.
  11967.  
  11968.                The constants TRUE and FALSE, as defined in the OPENDOOR.H file,
  11969.                are used to represent the two states of a Boolean value. Thus, to
  11970.                set a boolean variable "wait" to the value of "True", you would
  11971.                use this line:
  11972.  
  11973.                          wait=TRUE;
  11974.  
  11975.                and to set the variable "wait" to "False", you would:
  11976.  
  11977.                          wait=FALSE;
  11978.  
  11979.                However, you SHOULD NOT test whether a Boolean variable is "True"
  11980.                or "False" by using the C compare (==) operator, as the value
  11981.                "True" will not always be the same numerical value. (Actually,
  11982.                the TRUE constant represents just one of many possible numerical
  11983.                values for "True"). Instead, to perform an action of the "wait"
  11984.                boolean variable is "True", you would:
  11985.  
  11986.                          if(wait)
  11987.                               {
  11988.                               ...        /* Whatever you want */
  11989.                               }
  11990.  
  11991.                and to perform an action if the "wait" boolean variable is
  11992.                "False', you would:
  11993.  
  11994.                          if(!wait)
  11995.                               {
  11996.                               ...       /* Whatever you want */
  11997.                               }
  11998.  
  11999.                For interest sake, Boolean values are named after the 19th
  12000.                century English mathematician, who studied formal logic, and
  12001.                created Boolean algebra - an algebra which deals with TRUE and
  12002.                FALSE values.
  12003.  
  12004.  
  12005. BPS            BPS is an acronym for "Bits Per Second". For our purposes here,
  12006.                the terms BPS and BAUD refer to the same thing.
  12007.  
  12008.  
  12009. CARRIER        The term "Carrier" or "Carrier Detect" refers to a signal which
  12010. DETECT         most modems send to the computer, which indicates whether or not
  12011.                the modem is currently connected to (communicating with) another
  12012.  
  12013.  
  12014. OpenDoors Door Toolkit Manual - Version 4.10                       Page 194
  12015.  
  12016.  
  12017.  
  12018.                modem. The door driver module of OpenDoors, as with most other
  12019.                BBS software, uses the status of this carrier detect signal in
  12020.                order to know whether the user is still connected to the BBS
  12021.                computer. Thus, if the user hangs up, or if something goes wrong
  12022.                and the connection is lost, OpenDoors is able to detect this
  12023.                state, and exit to the BBS. The BBS will then also detect that
  12024.                the carrier signal has been "lost", and will reset itself, and
  12025.                then again be ready to accept calls.
  12026.  
  12027.  
  12028. CHAT MODE      The term "chat mode" refers to a means by which the sysop can
  12029.                communicate with a user of the BBS / door. During sysop chat,
  12030.                anything typed by the sysop will appear on the user's screen, and
  12031.                likewise, anything typed by the user will appear on the sysop's
  12032.                screen. Sysop chatting is available on both single and multi-line
  12033.                systems. Sysop chatting is initiated by the sysop, either at any
  12034.                time a user is online, or specifically in response to a sysop
  12035.                page.
  12036.  
  12037.  
  12038. DOOR           A "door" is a program that runs as part of a BBS system, but
  12039.                which is separate from the central BBS software (RemoteAccess,
  12040.                Maximus, QuickBBS, PC-Board, etc.) itself. A door provides
  12041.                additional features not built into the BBS software, such as on-
  12042.                line games, on-line shopping services, voting booths, match
  12043.                making systems, access to special files or messages, and much
  12044.                much more. Since the user also communicates with the door online,
  12045.                as they do with the BBS, it may not necessarily be obvious to the
  12046.                user that the door is even a separate entity from the central BBS
  12047.                software itself.
  12048.  
  12049.  
  12050. DOOR DRIVER    OpenDoors is broken into two individual, though closely related
  12051.                package, the door driver module and the BBS interface module. The
  12052.                door driver module is a complete toolkit used to quickly and
  12053.                easily write BBS door programs.
  12054.  
  12055.  
  12056. DOOR           Also referred to as a "drop file", "exit file", or "chain
  12057. INFORMATION    file". The door information file is a file passed from the
  12058. FILE           central BBS software to a door program, providing it with
  12059.                information about the user who is online, the BBS the door is
  12060.                running under, and the current modem connection. The door
  12061.                information file may also be used to pass changed information
  12062.                back to the BBS, such as the amount of time that the user has
  12063.                used in the door. OpenDoors takes care of all of the work
  12064.                involved in reading and writing the door information file for
  12065.                you, as described in the "Basics of Door Programming" section, in
  12066.                chapter 4. Examples of door information files supported by
  12067.                OpenDoors include: DOOR.SYS, EXITINFO.BBS, DORINFO?.DAT,
  12068.                SFDOORS.DAT, CALLINFO.BBS and CHAIN.TXT.
  12069.  
  12070.  
  12071. ECHO           See "Local Echo".
  12072.  
  12073.  
  12074.  
  12075.  
  12076. OpenDoors Door Toolkit Manual - Version 4.10                       Page 195
  12077.  
  12078.  
  12079.  
  12080. FOSSIL DRIVER  The FOSSIL driver, or simply FOSSIL, is a particular computer
  12081.                program which OpenDoors uses in order to facilitate its
  12082.                communication with a modem. The FOSSIL driver is either an MS-DOS
  12083.                device driver or TSR program that is loaded prior to starting up
  12084.                the BBS or your DOOR, usually from the AUTOEXEC.BAT or CONFIG.SYS
  12085.                files. The two most commonly used FOSSIL drivers are X00 and BNU.
  12086.                (FOSSIL is an acronym for "Fido/Opus/SEAdog Standard Interface
  12087.                Layer", although it has now become the standard for nearly all
  12088.                BBS software.)
  12089.  
  12090.  
  12091. LOCAL MODE     The term "local mode" refers to a mode in which a BBS system or
  12092.                door program may operate. In local mode, the BBS/door behave as
  12093.                they would if a user were connected via modem to the BBS, except
  12094.                that all display and input is done simply on the BBS software,
  12095.                but not through the modem. Local mode allows the sysop or another
  12096.                person with direct access to the BBS computer to use the BBS/door
  12097.                software, either for their own user, or for testing that the
  12098.                software is running correctly. When programming door software,
  12099.                local mode can be very useful in testing and debugging the door,
  12100.                without requiring the door to be connected to a remote system.
  12101.                All doors written with OpenDoors automatically support local mode
  12102.                operation. Compare "Remote".
  12103.  
  12104.  
  12105. LOCAL ECHO     The term "Local Echo" refers to a door displaying the same
  12106.                characters which are sent to the modem on the local screen
  12107.                ("Output Window"). This allows the sysop to view the same
  12108.                information that is sent to the user's system, in the same manner
  12109.                that it will appear on the user's screen.
  12110.  
  12111.  
  12112. LOCKED         (eg. "Locked Baud Rate", "Locked BPS Rate", "Locked Commport
  12113.                Speed", etc.) Usually, the communication port to which a modem is
  12114.                connected is set to transfer data at the same BPS rate as the
  12115.                rate at which the modem is communicating. However, many high
  12116.                speed modems allow very high speed data transfer by using built-
  12117.                in data compression methods. In this case, the actual rate of
  12118.                data transfer can easily exceed the true BPS rate of the
  12119.                connection. As a result, the BPS rate of the port is kept a
  12120.                single speed, faster than any of the true modem connections, in
  12121.                order to increase modem speed performance. This is referred to as
  12122.                locking the commport BPS rate. OpenDoors has full support for the
  12123.                use of locked BPS rates.
  12124.  
  12125.  
  12126. LOG FILE       A log file is a normal text file in which BBS software records
  12127.                all major activities that have taken place. As such, the log file
  12128.                permits the sysop, to review what activities have taken place on
  12129.                the BBS during the time which they have been away from the
  12130.                computer. A log file can be helpful in identifying system errors
  12131.                or crashes that have occurred, in alerting the sysop in the case
  12132.                that any users have been causing problems on the BBS, or in
  12133.                simply letting the sysop know who has called recently, and what
  12134.                when they did when they called.
  12135.  
  12136.  
  12137.  
  12138. OpenDoors Door Toolkit Manual - Version 4.10                       Page 196
  12139.  
  12140.  
  12141.  
  12142.  
  12143. MODEM          A device connected to a computer which permits it to communicate
  12144.                with other computers, usually over standard telephone lines.
  12145.  
  12146.  
  12147. ONLINE         In the case of BBS software and BBS door programs, the term
  12148.                online refers to the state of a user using the BBS. Usually, the
  12149.                user will be connected to the BBS from a remote location, using a
  12150.                modem. However, it is also possible that the user will be using
  12151.                the actual BBS computer, with the software operating in "local
  12152.                mode".
  12153.  
  12154.  
  12155. OUTPUT WINDOW  The local screen of the BBS on which BBS software is running is
  12156.                usually divided into two sections. At the bottom of the screen,
  12157.                there is often a one or two line status line, which displays
  12158.                information to the sysop about the BBS and the user who is
  12159.                currently online. The rest of the screen is usually an "output
  12160.                window", in which the information which is being displayed to the
  12161.                user, is also displayed on the local screen. In some cases, there
  12162.                will be no status line, in which case the entire screen will be
  12163.                the output window. Usually, the upper 23 lines of the screen in
  12164.                an OpenDoors door will be the output window, with the bottom two
  12165.                lines being the status line. However, it is possible to disable
  12166.                the OpenDoors status line, in which case the entire screen will
  12167.                be the output window. See also "Status Line"
  12168.  
  12169.  
  12170. PAGE           See "SYSOP PAGE"
  12171.  
  12172.  
  12173. PARAMETER      In the C programming language, many tasks are accomplished by
  12174.                calling functions. When a function is called, one or more pieces
  12175.                of information may be passed to a function, in the form of
  12176.                parameters. For example, a function used to set the foreground
  12177.                and background colour of displayed text might accept two
  12178.                parameters, one for each of the two colour settings. In this
  12179.                example, a function such as od_set_colour(), would be called as
  12180.                follows:
  12181.  
  12182.                               od_set_colour(D_GREEN,D_RED);
  12183.  
  12184.                In this case, D_GREEN, the foreground colour, is the first
  12185.                parameter, and D_RED, the background colour, is the second
  12186.                parameter.
  12187.  
  12188.                In C, parameters are enclosed in parentheses, ( and ), which are
  12189.                located after the name of the function to be called. Each
  12190.                parameter is then separated by a comma character. If a function
  12191.                does not accept any parameters, the parentheses will have nothing
  12192.                between them. (ie. od_clr_scr() ).
  12193.  
  12194.  
  12195. REGISTRATION   This is a demonstration version of OpenDoors, which may only be
  12196.                used under limited circumstances, for a limited period of time.
  12197.                If you wish to continue using OpenDoors after this "evaluation
  12198.  
  12199.  
  12200. OpenDoors Door Toolkit Manual - Version 4.10                       Page 197
  12201.  
  12202.  
  12203.  
  12204.                period", you must "register" it. For more information on
  12205.                registering OpenDoors, please see chapter 2 of this manual.
  12206.  
  12207.  
  12208. REMOTE         When used in reference to BBS software or door programs, the term
  12209.                remote is used to refer to a user or computer that is
  12210.                communicating with the BBS, for a distant location, by use of a
  12211.                modem. Compare "Local Mode"
  12212.  
  12213.  
  12214. STATUS LINE    Usually, the bottom two lines of the screen, as displayed by an
  12215.                OpenDoors door, is devoted to a status line (although this status
  12216.                line may be turned off). This status line will display
  12217.                information about the user who is online, along with information
  12218.                about the current state of the BBS system, and a reference to the
  12219.                sysop function keys. See also "Local Window".
  12220.  
  12221.  
  12222. SYSOP          The term sysop is a short-form for "SYStem OPerator", and refers
  12223.                to the individual who is responsible for running and maintaining
  12224.                the BBS system. The sysop is usually the only person who has
  12225.                direct access to the local keyboard and computer on which the
  12226.                BBS, BBS utilities and BBS doors are running.
  12227.  
  12228.  
  12229. SYSOP CHAT     See "CHAT MODE".
  12230.  
  12231.  
  12232. SYSOP PAGE     Sysop paging refers to the process whereby a user of the BBS
  12233.                system may call or page for the sysop's attention, when they wish
  12234.                to "chat" with the sysop, and can be thought of as being similar
  12235.                to the ringing of a telephone. When a user pages the sysop, the
  12236.                BBS system will produce some sort of sound, which the sysop may
  12237.                elect to respond to if they are within hearing range of the
  12238.                computer. The most common reasons for a user to page a sysop
  12239.                include the case that they are having difficulty with some aspect
  12240.                of the BBS, that they have a question, or if they are simply
  12241.                interested in having a friendly conversation with the sysop.
  12242.                Obviously, since the sysop may not wish to be disturbed by users
  12243.                paging at certain times (such as when they are in bed), most BBS
  12244.                software provides controls to allow you to control paging. These
  12245.                features might include the ability to set hours for each day of
  12246.                the week during which paging will be permitted, and the ability
  12247.                to temporarily override the ability of some or all callers to
  12248.                page the sysop.
  12249.  
  12250.  
  12251. USER           When applied to computers in general, the term user simply refers
  12252.                to any person using the computer hardware and software. However,
  12253.                when applied particularly to BBSes, the term user refers
  12254.                specifically to a person who calls the BBS, to carry out
  12255.                activities such as communicating via messages or chatting,
  12256.                uploading and downloading files, or using doors. Often, the term
  12257.                user is used in contrast with the term sysop. In this case, users
  12258.                are all of the people who call and user the BBS, other than the
  12259.                sysop themselves.
  12260.  
  12261.  
  12262. OpenDoors Door Toolkit Manual - Version 4.10                       Page 198
  12263.  
  12264.  
  12265.  
  12266.  
  12267.  
  12268. WINDOWS        Windows, or MicroSoft Windows, is a computer operating
  12269.                environment which runs on IBM PC and compatible computers, and
  12270.                such runs in conjunction with the MS-DOS or PC-DOS operating
  12271.                systems. This version of OpenDoors can only be used to produce
  12272.                DOS-mode programs, which will run under DOS, DESQview, Windows
  12273.                and OS/2.
  12274.  
  12275.  
  12276.  
  12277.  
  12278.  
  12279.  
  12280.  
  12281.  
  12282.  
  12283.  
  12284.  
  12285.  
  12286.  
  12287.  
  12288.  
  12289.  
  12290.  
  12291.  
  12292.  
  12293.  
  12294.  
  12295.  
  12296.  
  12297.  
  12298.  
  12299.  
  12300.  
  12301.  
  12302.  
  12303.  
  12304.  
  12305.  
  12306.  
  12307.  
  12308.  
  12309.  
  12310.  
  12311.  
  12312.  
  12313.  
  12314.  
  12315.  
  12316.  
  12317.  
  12318.  
  12319.  
  12320.  
  12321.  
  12322.  
  12323.  
  12324. OpenDoors Door Toolkit Manual - Version 4.10                       Page 199
  12325.  
  12326.  
  12327.  
  12328. --------------------------------------------------------------------------------
  12329. INDEX
  12330. --------------------------------------------------------------------------------
  12331.  
  12332. A
  12333. About This Manual, 20
  12334. Access Level, 144
  12335. Alias, 137
  12336. ANSI Graphics, 30, 112, 133, 193
  12337. Archive Contents, 181
  12338. ASCII Chart, 70
  12339. ASCII Mode, 193
  12340. AVATAR Graphics, 30, 100, 112, 134, 193
  12341.  
  12342. B
  12343. Baud Rate, 125
  12344. BBS Information, 126
  12345. BBS Name, 132
  12346. BBS Systems, 24
  12347. Before Exit Function, 152
  12348. Box Characters, 152
  12349. BPS Rate, 125
  12350. Built-In Function Keys, 162
  12351.  
  12352. C
  12353. Caller Information, 126
  12354. Carrier Detect, 35, 86
  12355. Chat, 93
  12356. Chat Mode, 27, 196
  12357. Colour Attribute Codes, 106
  12358. Colour Constants, 110
  12359. Colour Customization, 164
  12360. Colour Functions, 32
  12361. Colours, 94, 106, 109
  12362. Common Problems, 171
  12363. Compiler Errors, 171-172
  12364. Compiling With OpenDoors, 21
  12365. Configuration Files, 77
  12366. Custom Door Info File, 79
  12367. Custom Function Keys, 163
  12368.  
  12369. D
  12370. Debugging, 20, 169
  12371. Demo Version, 7
  12372. Display Functions, 31,47
  12373. Distribution Sites, 176, 179
  12374. Door Driver Functions, 31
  12375. Door Driver Module, 4, 23, 31, 196
  12376. Door Functions, 33
  12377. Door Information File, 24, 26, 122, 126
  12378. Door Settings, 147
  12379. DORINFOx.DEF File, 26
  12380. DOS Shell, 27, 152, 172
  12381. Download Limit, 136
  12382. Drop To BBS Key, 28
  12383.  
  12384.  
  12385.  
  12386. OpenDoors Door Toolkit Manual - Version 4.10                       Page 200
  12387.  
  12388.  
  12389.  
  12390. E
  12391. Error Free Connection, 137
  12392. ErrorLevels, 27
  12393. Example Program - Changing Only Foreground/Background Colour, 110
  12394. Example Program - Choosing Text Colour, 107
  12395. Example Program - Clearing A Line, 42
  12396. Example Program - Dialog Box, 50
  12397. Example Program - Door And Utility In One Program, 75
  12398. Example Program - Drawing A Window, 100
  12399. Example Program - Exiting A Door, 66
  12400. Example Program - EZVote, 26
  12401. Example Program - First Door, 23
  12402. Example Program - Hanging Up In CBV Door, 35
  12403. Example Program - Hotkeyed Menu, 73
  12404. Example Program - Input Key With Echo, 98
  12405. Example Program - Pausing In A Door, 86
  12406. Example Program - Setting Door Info File Location, 123
  12407. Example Program - Shelling To DOS, 116
  12408. Example Program - Terminal Emulation, 63
  12409. Example Program - Testing Available Door Information, 126
  12410. Example Program - Testing Screen Clearing Capabilities, 43
  12411. Example Program - Transferring A File Using DSZ, 117
  12412. Example Program - User Statistics Door, 96
  12413. Example Program - Waiting For CR, 40
  12414. Exiting A Door Program, 65
  12415.  
  12416. F
  12417. Features, 4
  12418. Feedback Form, 19
  12419. File Display Functions, 32
  12420. FILES.BBS File, 88
  12421. Fossil Driver, 24, 197
  12422. FOSSIL port, 125
  12423. Function Keys, 27, 86, 161
  12424. Future Versions, 191
  12425.  
  12426. G
  12427. Getting In Touch With Us, 174
  12428. Graphics Mode, 133-134, 193
  12429.  
  12430. H
  12431. Hangup, 27
  12432. History, 182
  12433.  
  12434. I
  12435. IBM Colour Attribute Codes, 106
  12436. IEMSI Session Information, 129
  12437. Inactivity Timeout, 155
  12438. Input Functions, 32, 67-68
  12439.  
  12440. K
  12441. Keyboard Buffer, 39, 86, 98
  12442. Keys, 86
  12443.  
  12444. L
  12445. Language Customization, 165
  12446.  
  12447.  
  12448. OpenDoors Door Toolkit Manual - Version 4.10                       Page 201
  12449.  
  12450.  
  12451.  
  12452. Learning OpenDoors, 23
  12453. LIBrary Files, 22
  12454. Line Number, 124
  12455. Linking, 21
  12456. Local Mode, 26, 197
  12457. Locked, 5, 197
  12458. Lockout, 27
  12459.  
  12460. M
  12461. Memory Models, 21-22
  12462. Memory Swapping, 159
  12463. Modem Port, 125
  12464. Modem Settings, 125
  12465.  
  12466. N
  12467. New Version, 182
  12468. Node Number, 124
  12469.  
  12470. O
  12471. od_before_exit Variable, 29
  12472. od_carrier() Function, 35
  12473. od_clear_keybuffer() Function, 30, 39
  12474. od_clr_line() Function, 41
  12475. od_clr_scr() Function, 30, 43, 171
  12476. od_colour_config() Function, 37
  12477. od_control Structure, 25, 120
  12478. od_disable Variable, 154
  12479. od_disp() Function, 45
  12480. od_disp_str() Function, 47
  12481. od_draw_box() Function, 49
  12482. od_edit_str() Function, 52
  12483. od_emulate() Function, 63
  12484. od_exit() Function, 23, 25, 65, 152, 153
  12485. od_get_answer() Function, 67
  12486. od_get_key() Function, 23, 39, 68
  12487. od_hotkey_menu() Function, 72
  12488. od_init() Function, 24, 74, 122
  12489. od_init_with_config() Function, 29, 77
  12490. od_input_str() Function, 39, 84
  12491. od_kernal() Function, 25, 86
  12492. od_list_files() Function, 88
  12493. od_log_open() Function, 90
  12494. od_log_write() Function, 92
  12495. od_page() Function, 93, 158
  12496. od_printf() Function, 23, 94, 154
  12497. od_putch() Function, 98
  12498. od_repeat() Function, 100
  12499. od_send_file() Function, 30, 102
  12500. od_set_attrib() Function, 106
  12501. od_set_color() Function, 109
  12502. od_set_cursor() Function, 112
  12503. od_set_statusline() Function, 114
  12504. od_spawn Function, 158
  12505. od_spawn() Function, 116
  12506. od_spawnvpe() Function, 118
  12507. OPENDOOR.H File, 21, 23, 28
  12508.  
  12509.  
  12510. OpenDoors Door Toolkit Manual - Version 4.10                       Page 202
  12511.  
  12512.  
  12513.  
  12514. OpenDoors BBS, 173
  12515. OpenDoors Customization, 150
  12516. OpenDoors Distribution Network, 176 - 179
  12517. OPENDOORS Echo, 174
  12518. OpenDoors History, 182
  12519. Our Address, 174
  12520. Output Functions, 31
  12521. Output Window, 26, 198
  12522.  
  12523. P
  12524. Paging Hours, 147-148
  12525. Paging The Sysop, 93
  12526. Pause Key, 156
  12527. Phone Number, 137
  12528. Printing Manual, 20
  12529. Problems, 20
  12530. Product Support, 173
  12531. Project Files, 21
  12532.  
  12533. R
  12534. Registration, 7, 9, 13, 17, 174, 198
  12535. Registration Form, 11, 17
  12536. Running Doors, 24, 26
  12537.  
  12538. S
  12539. Screen Functions, 32
  12540. Screen Length, 143
  12541. Screen Width, 144
  12542. Security Level, 144
  12543. Setting Colours, 94, 106, 109
  12544. Solutions To Problems, 171
  12545. Source Code, 7, 15
  12546. Special Thanks, 192
  12547. Status Line, 26, 93, 114, 159, 199
  12548. Stop Key, 156
  12549. Support, 173
  12550. Support BBS, 173-174
  12551. Swapping, 159
  12552. Sysop Chat, 152
  12553. Sysop Function Keys, 161
  12554. Sysop Keys, 27, 86
  12555. Sysop Name, 131
  12556. Sysop Next Key, 28
  12557. Sysop Next Setting, 148
  12558. Sysop Page, 158
  12559. Sysop Paging, 93, 199
  12560. System Event, 130
  12561. System Name, 132
  12562.  
  12563. T
  12564. Terminal Emulator, 63, 102, 103
  12565. Terminal Emulator Control Codes, 104
  12566. Text Customization, 165
  12567. Thank-yous, 192
  12568. Time Left, 145
  12569. Timeout, 86
  12570.  
  12571.  
  12572. OpenDoors Door Toolkit Manual - Version 4.10                       Page 203
  12573.  
  12574.  
  12575.  
  12576. Troubleshooting, 20
  12577. Turbo C, 172
  12578.  
  12579. U
  12580. User Handle (Alias), 137
  12581. User Information, 126
  12582. User Keyboard Off Key, 28, 39
  12583. User Keyboard Setting, 148
  12584. User Name, 141
  12585. User Password, 142
  12586. User Timeout, 86
  12587.  
  12588. V
  12589. Version History, 182
  12590.  
  12591. W
  12592. Want-Chat Setting, 146
  12593.  
  12594.  
  12595.  
  12596.  
  12597.  
  12598.  
  12599.  
  12600.  
  12601.  
  12602.  
  12603.  
  12604.  
  12605.  
  12606.  
  12607.  
  12608.  
  12609.  
  12610.  
  12611.  
  12612.  
  12613.  
  12614.  
  12615.  
  12616.  
  12617.  
  12618.  
  12619.  
  12620.  
  12621.  
  12622.  
  12623.  
  12624.  
  12625.  
  12626.  
  12627.  
  12628.  
  12629.  
  12630.  
  12631.  
  12632.  
  12633.  
  12634. OpenDoors Door Toolkit Manual - Version 4.10                       Page 204